Unexpected output while using for each loop

Apple.Apple.Apple.Apple.Apple.
instead of A.p.p.l.e.

@girishgargcool, at line 9 instead of

cout<<s<<".";

it should be

cout<<c<<".";

sorry. That was very embarrasing

lol its fine. mark your doubt as resolved if you got the answer