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
Is null always defined as 0(zero)?
explain what are pointers?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
Can we replace the struct function in tree syntax with a union?
What is the total generic pointer type?
What are pointers? Why are they used?
What is difference between %d and %i in c?
Difference between pass by reference and pass by value?
How to write c functions that modify head pointer of a linked list?
How is = symbol different from == symbol in c programming?
What are the scope of static variables?
What are global variables and explain how do you declare them?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
How do you determine whether to use a stream function or a low-level function?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?