Q.1

#define clrscr() 100

main()

{

clrscr();

printf( "%dn", clrscr() );

}

  • 100
  • 0
  • Compilation error
  • Exception occurs
Q.2

enum colors {BLACK,BLUE,GREEN}

main()

{

printf( "%d..%d..%d", BLACK, BLUE, GREEN );

return(1);

}

  • 1..2..3
  • 0..1..2
  • 1..1..1
  • 0..0..0
Q.3

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" );
}

  • The Lord of the Rings
  • American Beauty
  • Compilation error: Cannot compare signed number with unsigned number
  • Warning: Illegal operation
0 h : 0 m : 1 s