void main()
{
char c;
while(c=getchar()!='\n')
printf("%d",c);
}
o/p=11 why?
Answer Posted / deepshree sinha
the while loop is continue until the expression is not false.
when the expression is false that is when c='\n' it will come
out from the loop.then it will print c which is equal to '\n'
whose integer value is 11.so it will print 11.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
pierrot's divisor program using c or c++ code
Why c is called free form language?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is a struct c#?
How can I make it pause before closing the program output window?
How do I send escape sequences to control a terminal or other device?
Can math operations be performed on a void pointer?
What is difference between structure and union?
What are the string functions? List some string functions available in c.
How can you increase the size of a statically allocated array?
What is meant by preprocessor in c?
How pointers are declared?
What are 'near' and 'far' pointers?
What is new line escape sequence?
Can true be a variable name in c?