C MCQ Questions and Answers for TCS Ninja

Find all the previous year asked TCS Ninja C MCQ Questions and answers only on PrepInsta.

Buy soon price is going to increase tomorrow –

Get all the questions asked Today in TCS here – 

TCS Ninja Live Questions Dashboard

  1. Eesha was in a wonderland where she saw a treasure trove of seven items of various items (in lakhs) and weights (in kgs) as per the table given below.

Value – Weight

12                4

10              6

8               5

11             7

14            3

5             10

5               12

She wanted to bring back maximum value of items but she was not able to carry more than 10 kgs.  Using dynamic programing, what is the maximum value of of the items that she could carry back with her.

Answer: 26

2. In c language, if a function return type is not explicitly defined then it defaults to what data type?

Answer: Int

3. Which of the following syntax is correct for command -line arguments?

a. int main (char *argv[], int argc)

b. none of the three options

c. int main ()


int argv, char *argc[];


d. int main(int var, char *varg[])

Answer: int main (int var,char *varg[])

Online Classes

  1. Free Paid Materials also given
  2. Click here to join Online Live Class