← 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]?
- A."5"
- B."+"
- C."7"
- 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 →