C Language - Operators

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

 
25.

What will be the output of the following statements ?

int i = 3;
printf("%d%d",i,i++);

A. 34 B. 43
C. 44 D. 33




26.

What will be the output of the following program ?

#include
void main()
{
int a = 36, b = 9;
printf("%d",a>>a/b-2);
}

A. 9 B. 7
C. 5 D. none of these




27.

int i = 4;
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;
case 8:
i += 5;
break;
}
printf("i = %d\n", i);
What will the output of the sample code above be?

A. i = 5 B. i = 6
C. i = 7 D. i = 8




28.

Find the output :

main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}

A. mmmm
mmmm
mmmm
B. mmmm
aaaa
nnnn
C. mmmm
aaaa
aaaa
D. mmmm
nnnn
nnnn




29.

Find the output :

main()
{
int i=-1,j=-1,k=0,l=2,m;
m=i++&&j++&&k++||l++;
printf("%d\t %d\t %d\t %d\t %d\t",i,j,k,l,m);
}

A. 0 0 1 3 1 B. 0 0 0 3 1
C. 0 0 1 1 1 D. 0 0 1 3 3




30.

Find the output :

main()
{
char *p;
printf("%d %d ",sizeof(*p),sizeof(p));
}

A. 11 B. 12
C. 22 D. 42




« previous

1

2

3

4

5

6

7

8

9

next »

 
 
 



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