printf("%d\n",printf("%d",printf("%d",i)));
<----- 1 ------> This will print 1
and printf returns 1
<------------ 2 --------------> This will print the
return value of printf <1> and it will return 1.
<------------------- 3 ---------------------------> This will print the
return value of printf <2> and it will again return 1 but there is no
printf to print it.
Hope I make it clear to you.
-Shafi
On Thu, Jul 29, 2010 at 2:16 PM, tarak mehta <[email protected]> wrote:
> #include<stdio.h>
> int main()
> {
> int i=1;
> printf("%d\n",printf("%d",printf("%d",i))); return 0;
> }
>
>
> output is 111..i was expecting it to be 11..plz explain??
>
> --
> 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]<algogeeks%[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.