Multiple choice

(I) Every time we supply new set of values at command prompt, we need to recompile the program. (II) Even if integer/float arguments are supplied at command prompt, they are treated as strings. (III) The first argument to be supplied at command-line must always be the count of total argument.

Which of the above statement/s is/are true about command line argument?

  1. II

  2. I, II

  3. II, III

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Command line arguments are always passed to the main function as an array of strings, even if they represent numeric values. Statement I is false because arguments are runtime inputs, and statement III is false because the first argument is the program name.