Discussion
What does the second parameter of the main function represent?
Answer: B
Correct answer: List of command line arguments
The second parameter is argv, an array of pointers to the argument strings - one pointer per argument, in the order typed.
argv[0] holds the program name and argv[argc] is guaranteed to be a null pointer, so the list can be walked either by counting to argc or by stopping at the null. The count is the first parameter, and C has no dictionary or stack type to offer.
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