C Programming Viva Questions and Answers Pdf - 1

Question: 1

A single character input from the keyboard can be obtained by using the function

(A) printf()

(B) scanf()

(C) getchar()

(D) putchar()

Ans: C

getchar()

Question: 2

A program can be terminated at any time by calling the function

(A) clearer()

(B) exit()

(C) fflush()

(D) ferror()

Ans: B

exit()

Question: 3

The math library is set up for the used by the file

(A) math.h

(B) time.h

(C) limits.h

(D) float.h

Ans: A

math.h

Question: 4

A pointer is a variable to which

(A) the address of another variable is assigned

(B) the point type of data is assigned

(C) an integer is assigned

(D) all of these

Ans: A

the address of another variable is assigned

Question: 5

The flag is used in the conversion specification to print

(A) a number with right justification in a field

(B) a number with left justification in a field

(C) a number in the hexadecimal system

(D) an integer with a sign

Ans: D

an integer with a sign

Related Questions