TRUE
FALSE
What will be output if you compile and execute the following ‘C’ code?
void main() { float a=5.2; if(a==5.2) printf("Equal"); else if(a<5.2) printf("Less than"); else printf("Greater than"); }
float a=5.2; if(a==5.2) printf("Equal"); else if(a<5.2) printf("Less than"); else printf("Greater than"); }
Equal
Less than
Greater than
Compilation error
void main(){ int i=4,x; x=++i + ++i + ++i; printf("%d",x); }
21
18
19
break
exit(0)
abort()
All of the mentioned
main function arguments
main arguments
Command-Line arguments
Parameterized arguments
fend( )
endf( )
EOF
FEND
a value of 0
either 1 or 0
a value of 1
any positive integer
outside the function
throughout the program
only in the function where it is defined
surrounding of that function
What will be the output of following program
void main()
{
int x,y = 10;
x = y * NULL;
printf(“\n %d \n", x);
}
error
0
10
Garbage value
What is the output of this C code?
#include
static int x;
if (x++ < 2)
main();
Infinite calls to main
Run time error
Varies
main is called twice