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
shorting algorithmS
Multiply an Integer Number by 2 Without Using Multiplication Operator
about c language
How will you divide two numbers in a MACRO?
In a switch statement, what will happen if a break statement is omitted?
What is a floating point in c?
State the difference between realloc and free.
Why pointers are used in c?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
develop algorithms to add polynomials (i) in one variable
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Write a code to determine the total number of stops an elevator would take to serve N number of people.
how logic is used
What is hashing in c language?
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.