C Programming Online Test Questions and Answers - 2

Question: 6

a + b = b + c is not a valid arithmetic statement because the left hand side ____

(A) constant

(B) a variable

(C) an expression

(D) none of the above

Ans: C

an expression

Question: 7

Which of the following is a loop structure available in C?

(A) While structure

(B) For structure

(C) Do-while structure

(D) All the above

Ans: D

All the above

Question: 8

Which of the following statements is used to come out of the loop?

(A) Continue

(B) Break

(C) Both

(D) None of the above

Ans: B

Break

Question: 9

The general format of the one dimensional array declaration is ____

(A) Data type

(B) Data type array name;

(C) Data type array – name [n];

(D) Type array [n]

Ans: C

Data type array – name [n];

Question: 10

Which of the following operators return a true value only when both the operands are true?

(A) Assignment

(B) AND

(C) OR

(D) NOT

Ans: B

AND

Related Questions