Explanation: The prototype for printf as per ANSI C is:
int printf( const char *format,…) the return value is integer and returns the number of characters successfully read by printf. Also,in case of printf(),the evaluation of expressions passed on as arguments is done from right to left on stack and then printed from left to right by popping the stack. So,the output comes as: c :Evaluation of printf("%c\n",b).Note that after execution,they return the number of characters read. 10000: Evaluation of printf("%d\n",a) 6,2 :No of characters read printed from left to right as printf now is: printf("%d %d",6,2); ================ Ashish Kumar Jain On Jun 11, 8:56 am, Rohit Saraf <rohit.kumar.sa...@gmail.com> wrote: > c > 10000 > 6,2 > > u might be expecting 5,1 if u are forgetting the newline character :) > -------------------------------------------------- > Rohit Saraf > Second Year Undergraduate, > Dept. of Computer Science and Engineering > IIT Bombayhttp://www.cse.iitb.ac.in/~rohitfeb14 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.