# Variables and Constant

C Programming Quiz on Variables and Constant

0
Created on By wefru

Variables and Constant

1 / 10

Q.41 What will be the output of the following arithmetic expression ? 5+3*2 10-8*6

2 / 10

Q.42 What will be the output of the following statement ? int a=10; printf("d &i",a,10);

3 / 10

Q.43 What will be the output of the following statement ? printf(" Xx ci x",11,10,'s',12);

4 / 10

Q.44 What will be the output of the following statements ? int a = 4, b = 7,c; c = a = = b; printf("i",c);

5 / 10

Q.45 What will be the output of the following statements ? int a = 5, b = 2, c = 10, i = a>b

void main()

{ printf("hello"); main(); }

6 / 10

Q.46 What will be output if you will compile and execute the following c code? struct marks{

int p:3; int c:3; int m:2;

};

void main(){

struct marks s={2,-6,5}; printf(" d d d",s.p,s.c,s.m);

}

7 / 10

Q.47 What will be the output of the following statements ? int x = {1,2,3}; printf("d d D",x,x,x);

8 / 10

Q.48 What will be the output of the following statement ? printf( 3 + "goodbye");

9 / 10

Q.49 What will be the output of the following statements ? long int a = scanf("ld ld",&a,&a); printf("ld",a);

10 / 10

Q.50 What will be the output of the following program ?

1. #include

void main()

{ int a = 2; switch(a)

{ case 1:

printf("goodbye"); break; case 2:

continue; case 3:

printf("bye");

}

}