Discussion
The first argument to be supplied at command-line must always be count of total arguments.
Answer: B
Correct answer: False
Nothing of the kind is supplied by the user. The shell counts the arguments itself and passes that count to the program in argc, so the count travels alongside the arguments rather than among them.
Everything the user types after the program name is an ordinary argument, available from argv[1] onwards. Requiring the user to state a count would be redundant and error-prone, and no convention on any common system does so.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development