## C - Language Multiple Choice Questions ( 21 - 30)

21. Which of the below is not a correct declaration in C - Language ?

A. int y = x + 45, int x;

B. int x, int y = x + 45;

C. int x, int y;

D. int x = 35, int y;

22. Which of the following statements execute with out an error ?

A. float p = q = r = 23.45;

B. int x,y,z;

x = y = z = 7628

C. float p,q,r;

p = q = r = 23.45;

D. None of these.

23. Which of the following arithmetic statement is valid ?

A. a = b(cd).e(fg) B. a = b*(c*d)*e(f*g) C. b(c*d).e(f*g) D. None of these.

24. Identify the false statement.

A. An arithmetic operation between an integer and integer gives an integer value.

B. An arithmetic operation between a real and real always gives a real value.

C. An arithmetic operation between an integer and real always gives a real result.

D. An arithmetic operation between an integer and real always gives an integer result.

25. What will be the values of a and b after execution of this?

void main()

{

int i, float b;

a = 78.5;

b = 28;

printf( "%d \t %f ", a,b);

}

A. a =0, b = 0

B. a = 78.5, b = 28

C. a = 78, b = 28.0000

D. Error;

26. consider the expression (A+B) + ( C*D) + (E+F), which operation is evaluated first?

A. A+B B. C*D C. E+F D. All at once

27. Which of the following statements is wrong.

A. ugc = 54345.454;

B. net = 'U' * 'G' * 'C';

C. cbse = 34.4 * 2.1;

D. 34 + 45 = ugcnet;

28. The value of X after evaluation of expression X = 45/22 * (3.14+4) * 5/2

A. 36.511 B. 3.6511 C. = 45.12 D. 12.45

29. Hierarchy decides which operator

A. is most important B. is used first C. is fastest D. Operates last

30. what will be the value of X after evaluation of expression X = 5/4.5 ( If X declared as float)

A. 0 B. Cannot be determined C. 1.1111 D. None of the above

A. int y = x + 45, int x;

B. int x, int y = x + 45;

C. int x, int y;

D. int x = 35, int y;

22. Which of the following statements execute with out an error ?

A. float p = q = r = 23.45;

B. int x,y,z;

x = y = z = 7628

C. float p,q,r;

p = q = r = 23.45;

D. None of these.

23. Which of the following arithmetic statement is valid ?

A. a = b(cd).e(fg) B. a = b*(c*d)*e(f*g) C. b(c*d).e(f*g) D. None of these.

24. Identify the false statement.

A. An arithmetic operation between an integer and integer gives an integer value.

B. An arithmetic operation between a real and real always gives a real value.

C. An arithmetic operation between an integer and real always gives a real result.

D. An arithmetic operation between an integer and real always gives an integer result.

25. What will be the values of a and b after execution of this?

void main()

{

int i, float b;

a = 78.5;

b = 28;

printf( "%d \t %f ", a,b);

}

A. a =0, b = 0

B. a = 78.5, b = 28

C. a = 78, b = 28.0000

D. Error;

26. consider the expression (A+B) + ( C*D) + (E+F), which operation is evaluated first?

A. A+B B. C*D C. E+F D. All at once

27. Which of the following statements is wrong.

A. ugc = 54345.454;

B. net = 'U' * 'G' * 'C';

C. cbse = 34.4 * 2.1;

D. 34 + 45 = ugcnet;

28. The value of X after evaluation of expression X = 45/22 * (3.14+4) * 5/2

A. 36.511 B. 3.6511 C. = 45.12 D. 12.45

29. Hierarchy decides which operator

A. is most important B. is used first C. is fastest D. Operates last

30. what will be the value of X after evaluation of expression X = 5/4.5 ( If X declared as float)

A. 0 B. Cannot be determined C. 1.1111 D. None of the above

where is answer sir?

ReplyDelete