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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s