what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
}
Answer Posted / himanshu goel
fail
because here if is taking 0 boolean value means condition
becomes false and else will be executed
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
What are header files and explain what are its uses in c programming?
What is the sizeof () a pointer?
What are valid signatures for the Main function?
What are header files? What are their uses?
How #define works?
What is a dynamic array in c?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is cohesion in c?
What is methods in c?
How many types of arrays are there in c?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
What does the error message "DGROUP exceeds 64K" mean?
Does free set pointer to null?
Why is C language being considered a middle level language?
What is the advantage of an array over individual variables?