TCS C Programming MCQ Questions – 7

Ques. 1 Which is the character array used to accept command line arguments?
A) char argv
B) char* argv[]
C) char argv[]
D) char* argv
Ans: b

Ques. 2 Which is not a string function?
A) strstr
C) strupr
D) strchr
Ans: c

Ques. 4 Which of the following does not require to include math.h header file?
A) pow()
B) rand()
D) sinh()
Ans: b

Ques. 5 What is the task of pre-processor?
A) Expanding
B) Compiling
C) Linking
D) All of the above
Ans: a

Ques. 6 Which of the following is true?
A) realloc() can change the memory size of arrays
B) Unary operator works on only one operand
C) Struct and Union works in same way.
D) None of the above
Ans: b

Ques. 7 Which of this is used to skip one iteration:
A) break
B) continue
C) goto
D) return
Ans: b

Ques. 8 Which address does a pointer to an array store:
A) Memory address of the first element of the array Don’t remember the other options.

Ques. 9 Predict the output:
float a = 0.1;
printf(“No”); Answer would be No.
Ans: no