LIVE Course for free

Rated by 1 million+ students
Get app now
0 votes
115 views
in Information Technology by (24.2k points)
closed by
In context of command line arguments in C programming, which of the following is true about argv?
1. It is an array of character pointers
2. It is pointer to an array of character pointers.
3. It is an array of characters
4. It is a simple integer variable 

1 Answer

0 votes
by (24.2k points)
selected by
 
Best answer
Correct Answer - Option 1 : It is an array of character pointers

When the main function is called, it is called with two arguments. The first i.e. argc (argument count) is the number of command-line arguments the program was invoked with; the second i.e. argv (argument vector) is a pointer to an array of character strings that contain the arguments, one per string.

Therefore correct answer is Option 1

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...