Solved : NIELIT (O-Level) PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 18
1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)
1.1 : 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");
}
A) Equal B) Less than
C) Greater than D) Compilation error
Answer
Answer