TCS Ninja Miscelleneous Quiz-1

Question 1

Time: 00:00:00
Ques. 1 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

Start

Question 2

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

points to garbage value

points to garbage value

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

Please login to submit your explanation

if the value in the address is deleted but the pointer points the old empty address then it is called as the dangling pointer.

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

sir,strupr is a string function used to convert a string to uppercase

All these option are string function

Start

Question 4

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

rand()

rand()

pow()

pow()

sqrt()

sqrt()

sinh()

sinh()

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

Please login to submit your explanation

rand() is declared in header file stdlib.h

Start

Question 5

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

Compiling

Compiling

Expanding

Expanding

Linking

Linking

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

unary operator works on the only one operator

Start

Question 7

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

continue

continue

break

break

goto

goto

return

return

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:

A) Memory address of the first element of the array

A) Memory address of the first element of the array

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

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

Please login to submit your explanation

0.1 is a double datatype,if we use (a==0.1f) there we get \"Yes\"

no is answer

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!"]

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%

Completed

0/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

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.

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.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

Comments