TCS Technical Questions – MISC

If you think answer to some question is incorrect then comment down the correct answer and explanation in the comment section below.

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

Ques. 2 What is a dangling pointer?

Ques. 3 Which is not a string function?
A) strstr


C) strupr

D) strchr

Ques. 4 Which of the following does not require to include math.h header file?

A) pow()

B) rand()


D) sinh()

Ques. 5 What is the task of pre-processor?

A) Expanding

B) Compiling

C) Linking

D) All of the above

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

Ques. 7 Which of this is used to skip one iteration:

A) break

B) continue

C) goto

D) return

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;
Answer would be No.

Ques. 10 Another output based question which basically displayed the input string in reverse pattern.

For example, ABRACADABRA was displayed as ARBADACARBA.

Comment on the below while statement

while(0 == 0) { }

A) It has syntax error as there are no statements within braces {}

B) It will run for ever

C) It compares 0 with 0 and since they are equal it will exit the loop immediately

D) It has syntax error as the same number is being compared with itself

Prepare Better for Placement Papers