What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answer Posted / akash dhal
initialized with 0
in for loop ist time condition satisfied so print 0,like
this 127 will be printed .as it is a signed no. so 127+1 is
-128 so condition false come out of the loop.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is it fine to write void main () or main () in c?
What is type qualifiers?
Write a function that will take in a phone number and output all possible alphabetical combinations
write a program to find out prime number using sieve case?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
How can I make it pause before closing the program output window?
what is the height of tree if leaf node is at level 3. please explain
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is dynamic dispatch in c++?
What is a void pointer in c?
What is the meaning of && in c?
to find the closest pair
What does != Mean in c?
What does emoji p mean?
Compare array data type to pointer data type