Archive for the ‘'C' puzzles’ Category

Tr!cky ‘C’ M@cros

Posted: December 21, 2009 in 'C' puzzles
Tags: ,
#include <stdio.h>
#define f(a,b) a##b
#define g(a)   #a
#define h(a)   g(a)
  int main()
          return 0;
H! fnds try to give the output of the above pgm with ur xplanations..

Solve this Quine

Posted: October 19, 2009 in 'C' puzzles
Tags: ,

Predict the output of this code snippet

char *p=”#include <stdio.h> %c%c char *p=%c%s%c; %c%c void main(){%c%c printf(p,13,10,34,p,34,13,10,13,10,13,10,13,10); %c%c }”;
void main()

Frnds this qn is simple.. I need ur answer with a proper xplanation.

printf x 20

Posted: May 20, 2009 in 'C' puzzles
Tags: ,

cvoid main()


int i;




This code will print Deepu infinitely. Make this code to print Deepu exactly 20 times by changing only one ASCII character..[changing means appending a character or replacing one charater].

There are 3 possible solutions for this problem……

Obviously inserting 4 to make i=40 or inserting – to make i<-20 are NOT the answers
Mail me if u got answers or u need answers……….