String and Pointers

C Programming Quiz on String and Pointers

2
Created on By 52fd849a905aedf0249df9e69d61b55a?s=32&d=mm&r=gwefru

String and Pointers

TEST YOUR BROAD SKILLS

1 / 10

Q.51 What will be the output of the following statements ? int i = 1,j; j=i--- -2; printf("d",j);

2 / 10

Q.52 What will be the output of following program ? #include

 

main()

{

int x,y = 10;  x = y * NULL; printf(" d",x);

}

3 / 10

Q.53 What will be the output of following statements ?

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

4 / 10

Q.54 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);

5 / 10

Q.55 What will be the output of the following statements ? int i = 3;

printf(" d d",i,i++);

6 / 10

Q.56 What will be the output of the following program ? #include

void main()

{

int a = 36, b = 9; printf(" d",a>>a/b-2);

}

7 / 10

Q.57 int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

What value does testarray[2][1][0] in the sample code above contain?

8 / 10

Q.58 void main()

{

int a=10,b=20; char x=1,y=0; if(a,b,x,y)

{

printf("EXAM");

}

}

What is the output?

9 / 10

Q.59 What is the output of the following code? #include

void main()

{

int s=0; while(s++<10)> # define a 10 main()

{

printf(" d..",a); foo();    printf(" d",a);

}

void foo()

{

#undef a #define a 50

}

10 / 10

Q.60 main()

{

struct

{

int i;

}xyz;

(*xyz)->i=10; printf(" d",xyz.i);

}

What is the output of this program?

Your score is

The average score is 25%

0%

Leave a Reply

Your email address will not be published. Required fields are marked *