Monday, July 9, 2007

Interesting C Program -7

Guess the Output of the following C Program:


#include "stdio.h"
int main()
{
int i=43;
printf("%d\n",printf("%d",printf("%d",i)));
return 0;
}


The answer is 4321.
Explanation:
printf returns the number of letters printed.

No comments:

Search Google

Books that I refer to...

  • The Complete Reference C, Fourth Edition
  • The C Programming Language