C Language - Keywords

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

 
25.

What will be the output of program ?

#include
int main( )
{
int a,b;
printf("Enter two values of a and b");
scanf("%d%d",&a,&b);
printf("a=%d b=%d"a,b);
return 0;
}

A. a = 0 b = 0 B. a = 1 b = 1
C. Values you entered D. None of above




26.

What would be the Output of this Program ?

#include
void main()
{
char y='a';
int x=10;
float z=10.1;
printf("\nSizeof(10) : %d Byte",sizeof(10));
printf("\nSizeof('a') : %d Bytes",sizeof('a'));
printf("\nSizeof(10.1) : %d Bytes",sizeof(10.1));
}

A. Sizeof(10) : 2 Byte
Sizeof('a') : 1 Bytes
Sizeof(10.1) : 4 Bytes
B. Sizeof(10) : 1 Byte
Sizeof('a') : 1 Bytes
Sizeof(10.1) : 4 Bytes
C. Sizeof(10) : 2 Byte
Sizeof('a') : 2 Bytes
Sizeof(10.1) : 4 Bytes
D. Sizeof(10) : 2 Byte
Sizeof('a') : 2 Bytes




27.

What will be output of

#include
void main()
{
char test =`S`;
printf("\n%c",test);
}

A. S B. Error
C. Garbage value D. None of above




28.

What will be the output of following program

#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}

A. error B. 0
C. 10 D. Garbage value




29.

Out put of following program :

float x = 10.7;
int i;
i = (int) x;
print i;

A. null B. error
C. 10 D. garbage value




30.

What will be the output of following statements ?

char x[ ] = "hello hi"; printf("%d%d",sizeof(*x),sizeof(x));

A. 88 B. 18
C. 29 D. 19




« previous

1

2

3

4

5

6

next »

 
 
 



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