C Language Objective Questions and Answers - 1

Question: 1

An unary operator! represents

(A) Unary minus

(B) Logical not operator

(C) Decrement operator

(D) Increment operator

Ans: B

Logical not operator

Question: 2

The single character input/output functions are

(A) scan f ( ) and print f ( )

(B) get char ( ) and print f ( )

(C) scan f ( ) and put char ( )

(D)  get char ( ) and put char ( )

Ans: D

 get char ( ) and put char ( )

Question: 3

The general form of the condition expression is

(A) Expression ? expression 2 : expression 3

(B) Expression 3? Expression 2: expression 1

(C) Expression 2? expression 3? Expression 1

(D) None of these

Ans: A

Expression ? expression 2 : expression 3

Question: 4

The break statement is used to exit from a

(A) Do loop

(B) For loop

(C) Switch statement

(D) All of these 

Ans: D

All of these 

Question: 5

Which is not necessary when using bar codes in supermarkets?

(A) Price on the shelf

(B) Price on the goods

(C) Point-of sale (POS) terminal

(D) Check digit on the bar code

Ans: A

Price on the shelf

Related Questions