C Language - Operators

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

 
19.

What will be output if you will compile and execute the following c code?

#include
void call(int,int,int);
int main(){
int a=10;
call(a,a++,++a);
return 0;
}
void call(int x,int y,int z){
printf("%d %d %d",x,y,z);
}

A. 10 10 12 B. 12 11 11
C. 12 12 12 D. 10 11 12




20.

What will be output if you will compile and execute the following c code?

#include
int main(){
register int i,x;
scanf("%d",&i);
x=++i + ++i + ++i;
printf("%d",x);
return 0;
}

A. 17 B. 18
C. 19 D. Compiler error




21.

What will be output if you will compile and execute the following c code?

#include
int main(){
int i=3;
if(3==i)
printf("%d",i<<2<<1);
else
printf("Not equal");
}

A. 1 B. 24
C. 48 D. Not equal




22.

What will be the output of the following arithmetic expression ?

5+3*2%10-8*6

A. -37 B. -42
C. -32 D. -28




23.

What will be the output of the following statements ?

int a = 5, b = 2, c = 10, i = a>b
void main()
{
printf("hello");
main();
}

A. 1 B. 2
C. infinite number of times D. none of these




24.

What will be the output of the following statements?

int a=5,b=6,c=9,d; d=(ac?1:2):(c>b?6:8));
printf("%d",d);

A. 1 B. 2
C. 6 D. Error




« previous

1

2

3

4

5

6

7

8

9

next »

 
 
 



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