Discussion
Which of the following is TRUE about argv?
Answer: A
Correct answer: It is an array of character pointers
Declared as char *argv[], argv is an array whose elements are char * - one pointer per argument, each addressing a null-terminated string.
The second option describes char **argv read too literally: as a parameter the array does decay to a pointer to its first element, but the object itself is an array of pointers. "An array of strings" is loose talk, since C has no string type; what it has is an array of pointers to characters, which is precisely the first option.
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