Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

TCS NQT Miscellaneous Quiz- 1

Question 1

Time: 00:00:00
Which is the character array used to accept command line arguments?

char argv

char argv

char* argv[]

char* argv[]

char argv[]

char argv[]

char* argv

char* argv

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

char *argv[]

c

c

c

Start

Question 2

Time: 00:00:00
What is a dangling pointer ?

points to garbage value

points to garbage value

points to zero

points to zero

points to null value

points to null value

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Destructor arrives during object destruction

When variable goes out of scope or accessing local variable that doesn\'t exist anymore or at the time of deallocation of memory, the pointer becomes a dangling pointer

when a variable doesn\'t exist anymore, even after destruction of variable the pointer points to the memory which is already freed is called dangling pointer

destructor

Destructor arrives during object destruction

Destructor

Destructor

Start

Question 3

Time: 00:00:00
Which is not a string function ?

strstr

strstr

strupr

strupr

strcmp

strcmp

strchr

strchr

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Strupr converts a string to uppercase

Start

Question 4

Time: 00:00:00
Which of the following does not require to include math.h header file ?

pow()

pow()

rand()

rand()

sqrt()

sqrt()

sinh()

sinh()

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
What is the task of pre-processor ?

Compiling

Compiling

Expanding

Expanding

Linking

Linking

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Which of the following is true ?

realloc() can change the memory size of arrays

realloc() can change the memory size of arrays

Unary operator works on only one operand

Unary operator works on only one operand

Struct and Union works in same way.

Struct and Union works in same way.

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
Which of this is used to skip one iteration:

continue

continue

goto

goto

return

return

break

break

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
Which address does a pointer to an array store ?

Memory address of the first element of the array.

Memory address of the first element of the array.

Memory address of the sum of array elements.

Memory address of the sum of array elements.

value of first element of the array.

value of first element of the array.

None of the above.

None of the above.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
Predict the output:

float a = 0.1;

if(a == 0.1)

     printf(“Yes”);

else

    printf(“No”)

Yes

Yes

NO

NO

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

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

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

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

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Printf doesnt end with semicolon ...

ans is yes

Start

Question 10

Time: 00:00:00
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)

{

}

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

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

It will run for ever

It will run for ever

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

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

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

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

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Buy TCS NQT Paid Materials

Paid Materials TCS NQT

Join TCS NQT Online Classes

Completed

0/0

Accuracy

0%

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Comments