Discussion :: Testing sawaal
-
What will be output when you will execute following c code?
#include <stdio.h>
void main(){
signed int a = -1;
unsigned int b = -1u;
if(a == b)
printf( "The Lord of the Rings" );
else
printf( "American Beauty" );
}
A.
The Lord of the Rings
|
B.
American Beauty
|
C.
Compilation error: Cannot compare signed number with unsigned number
|
D.
Warning: Illegal operation
|
Answer : Option A
Explanation :
Be The First To Comment