Posts Tagged ‘Print 20 times’

printf x 20

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

cvoid main()

{

int i;

for(i=0;i<20;i–)

printf(“Deepu”);

}

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……

Note:
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……….