Thursday, 16 August 2012

What is the output of following c code after compilation and execution? | C Programming

#include<stdio.h>
int main()
{
floata=5.2;
if(a==5.2)
printf("Equal");
else
if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}


A. Equal
B. Less than
C.. Greater than
D. Compiler error
E. None of above

Ans: B

No comments: