C99. Passing Arguments to main function in C

Опубликовано: 30 Июнь 2026
на канале: Tech Courses
122
7

In this video we are going to discuss how to pass parameters to main function in C.

Summary :
main function syntax is as below
int main(int argc, char* argv[]){
//body
}

We can pass argc and argv parameters through command line.
Example:
./a 10 ramesh 20 hello 30

In this case,
argc will contain 6 and
argv[0] = 10
argv[1] = ramesh
argv[2] = 20
argv[3] = hello
argv[4] = 30

Audio language : Hindi
In this course , we are going to cover all C concepts in simple and easy to understand terms.
This course started from basics and now we are covering advance topics that are important from interview point of view.

Github : https://github.com/TechCourses4u/C-La...
Programs :
https://github.com/TechCourses4u/C-La...