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
What is openmp in c?
Why n++ execute faster than n+1 ?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What kind of structure is a house?
Is c still relevant?
What's a good way to check for "close enough" floating-point equality?
What is difference between structure and union?
Explain what is the benefit of using #define to declare a constant?
What is #define used for in c?
What is #include stdio h?
What is a macro, and explain how do you use it?
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
Differentiate between static and dynamic modeling.
Describe the modifier in c?
Differentiate fundamental data types and derived data types in C.