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


Please Help Members By Posting Answers For Below Questions

How many bytes are occupied by near, far and huge pointers (dos)?

682


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1130


What is the g value paradox?

656


What is the correct code to have following output in c using nested for loop?

617


What is the benefit of using an enum rather than a #define constant?

673






What is sizeof array in c?

599


Why c is a mother language?

563


What is hash table in c?

582


Is c is a middle level language?

606


why we wont use '&' sing in aceesing the string using scanf

1791


write a program to print data of 5 five students with structures?

1618


What is the difference between text files and binary files?

684


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2034


Differentiate between a structure and a union.

773


shorting algorithmS

1809