C Language - Operators

You Are Here :: Home > C Language > Operators - General Questions

 
37.

What will the following code print?

int count;
for (count = 4; count > 1; count--)
System.out.print(count + " ");

A. 1 2 3 4 B. 1 2 3
C. 4 3 2 D. 4 3 2 1




38.

What will be the value of `a` after the following code is executed

#define square(x) x*x
a = square(2+3)

A. 25 B. 13
C. 11 D. 10




39.

What will be output of the following program?

#include
int main(){
int i=1;
i=2+2*i++;
printf("%d",i);
return 0;
}

A. 2 B. 4
C. 5 D. 6




40.

What will be output of the following program?

#include
int main(){
int a=2,b=7,c=10;
c=a==b;
printf("%d",c);
return 0;
}

A. 2 B. 7
C. 10 D. 0




41.

main()
{
static int var = 5;
printf("%d ",var--);
if(var)
main();
}

A. 5 4 0 0 0 B. 5 4 3 0 0
C. 5 4 3 2 0 D. 5 4 3 2 1




42.

What will be output when you will execute following c code?

#include
int main(){
char a=250;
int expr;
expr= a+ !a + ~a + ++a;
printf("%d",expr);
return 0;
}

A. 249 B. 250
C. 0 D. -6




« previous

1

2

3

4

5

6

7

8

9

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on