Cmd
Cmd
command line, and the values of these arguments are passed on to your program
during program execution. When a program starts execution without user
interaction, command-line arguments are used to pass values or files to it.
int main()
here argc means argument count i.e :total number of arguments passed from
command prompt to your program.
#include <stdio.h>
{ int i;
printf("%s\n", argv[i]);
return 0;
How to execute:
C:\Users\Admin>cd Desktop
C:\Users\Admin\Desktop>example 10 20 30
You have entered 4 arguments:
example
10
20
30