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
Explain 'far' and 'near' pointers in c.
What should malloc() do?
What does the file stdio.h contain?
When is the “void” keyword used in a function?
What are the types of type qualifiers in c?
What is a const pointer in c?
What is getch?
Describe explain how arrays can be passed to a user defined function
What is structure packing in c?
Explain the process of converting a Tree into a Binary Tree.
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
How are Structure passing and returning implemented by the complier?
Differentiate between ordinary variable and pointer in c.
Explain the difference between structs and unions in c?
How to get string length of given string in c?