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

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

Question 3

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

strstr

strstr

strupr

strupr

strcmp

strcmp

strchr

strchr

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()

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

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

Question 7

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

continue

continue

goto

goto

return

return

break

break

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.

Question 9

Time: 00:00:00


Predict the output:
using namespace std;

int main()
{
float a = 0.1;
if(a == 0.1)
printf(“Yes”);
else
printf(“No”);
return 0;
}

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

Question 10

Time: 00:00:00
To print out a and b given below, which of the following printf() statement will you use?


#include<stdio.h>

float a=3.14;
double b=3.14;

printf("%Lf %f", a, b);

printf("%Lf %f", a, b);

printf("%f %lf", a, b);

printf("%f %lf", a, b);

printf("%Lf %Lf", a, b);

printf("%Lf %Lf", a, b);

printf("%f %Lf", a, b);

printf("%f %Lf", a, b);

null
null

Buy TCS NQT Paid Materials

Paid Materials TCS NQT

Join TCS NQT Online Classes

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%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Comments