🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Command-Line Arguments in C: all 10 questions

Quiz: Command-Line Arguments in C · Question 2 of 10

For the same command ./calc 5 + 7, what is argv[2]?

For the same command ./calc 5 + 7, what is argv[2]?

  1. A."5"
  2. B."+"
  3. C."7"
  4. D.The number 5
Answer & explanation

Correct answer: "+"

argv[0] is "./calc", argv[1] is "5", argv[2] is "+".

Can you get the rest right without peeking?

Take the timed Quiz: Command-Line Arguments in C quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →