Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

void main()
{
char c;
while(c=getchar()!='\n')
printf("%d",c);
}
o/p=11 why?

Answer Posted / sumeet saini

It says %d which means it prints integer value. If we want to print character we need to write %c. So the answer is right. If we replace %d with %c . This program will print what ever character we hit from keyboard until we press enter

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is openmp in c?

1064


Why n++ execute faster than n+1 ?

3141


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4744


What kind of structure is a house?

1096


Is c still relevant?

1135


What's a good way to check for "close enough" floating-point equality?

1251


What is difference between structure and union?

1190


Explain what is the benefit of using #define to declare a constant?

1270


What is #define used for in c?

1108


What is #include stdio h?

1177


What is a macro, and explain how do you use it?

1123


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1871


Differentiate between static and dynamic modeling.

1182


Describe the modifier in c?

1142


Differentiate fundamental data types and derived data types in C.

1086