Discussion on Information Technology in General Forum at TeluguPeople.com
TeluguPeople
  are the trend-setters

 
General Forum: Information Technology
C fans... Happy Thinking !!!
  Page: 1 of 1    


Now you can Read Only. Login to post messages
Email ID:
Password:
Remember me on this computer
There iz a site called "http://www.funducode.com/...Hope some of U might be knowin thiz site.... Hope U guyz know Yashwant Kanetkar, the famous author of several C 'n' C++ Programmin bookz...The site waz developed 'n' iz being maintaned by him..... Kinda verry verry good site on thiz planet earth. U can even subscribe for weekly programmin update....Njjoyyy.....

Posted by: UK At: 24, Sep 2002 12:32:32 PM IST
I can think of only two sols with single change. * Changing i to -i at cond eval. for ( i = 0; -i ( n; i--) printf ("-") ; * Changing "(" sign to "+". for ( i = 0; i + n; i--) printf("-") ; There are three solution in case of making two changes. * for ( i = 0; i ) -n; i--) printf("-") ; * for ( i = 0; i != -n; i--) printf("-") ; * for ( i = 0; i / n + 1; i--) printf("-") ; Good puzzle Ravi...

Posted by: Sreedhar G At: 24, Sep 2002 1:30:48 AM IST
Hi, Here's a good puzzle for C fans... Others, pls ignore. Given the following lines of code: int i, n = 20; for (i = 0; i ( n; i--) printf ("-"); Now you know that this will result in infinite loop. Show 3 ways in which , by changing 1 and only 1 character, it will print the character "-" 20 times. Note that changing i-- to i++ is not valid. Also you cant add or delete any character. You just have to alter 1 and only 1 character. Happy Thinking !!!

Posted by: Mr. Ravi Kumar Guntuku At: 23, Sep 2002 7:39:40 PM IST
  Page: 1 of 1    
 
Advertisements
Advertisements
Advertisements
Beauty and Skin Care
For all your favorite branded products of Beauty, Skin Care, Perfumes, Makeup and more!
News
Headline News
Cinema News
Business
Special Stories
Devotion
NRI News
Social Media
Facebook
Movie Gallery
Devotional Gallery
Twitter
Photo Galleries
News Gallery
Cinema Gallery
Beauty Gallery
Fashion Gallery
Sports Gallery
Travel Gallery
Devotion
Classifieds
Jobs
Real Estate
Automobile
Personals

Search TeluguPeople.com

(C) 2000-2025 TeluguPeople.com, All Rights Reserved.