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

shorting algorithmS

2259


Multiply an Integer Number by 2 Without Using Multiplication Operator

769


about c language

2018


How will you divide two numbers in a MACRO?

1141


In a switch statement, what will happen if a break statement is omitted?

1069


What is a floating point in c?

1075


State the difference between realloc and free.

1092


Why pointers are used in c?

1015


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1148


develop algorithms to add polynomials (i) in one variable

2170


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1976


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1261


how logic is used

1976


What is hashing in c language?

1322


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1995