hi...i gues u getting confused vth d last character o/p 4m d last
printf...so i guess dat i'll be cleared..if u jst modify ur test
string......
chk dis out
main()
{
char ch[]="ABCP";
char *s;
s=ch;
printf("%c",*s++);
printf("%c",*++s);
printf("%c",++*s);
}
d last printf isnt printin d D vich is d last character bt d value after
incrementin wen d pointer still points 2 d charactr "C" in string...
hope i was clear @ xplainatn...
Regards,
PAYAL GUPTA,
NIT-BHOPAL.
On Sat, Jan 14, 2012 at 3:10 PM, om prakash yadav <
[email protected]> wrote:
> main()
> {
> char ch[]="ABCD";
> char *s;
> s=ch;
> printf("%c",*s++);
> printf("%c",*++s);
> printf("%c",++*s);
> }
>
> Can anyone plz tell me the concept behind output??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.