C – Command line arguments

Prev     Next C Command line arguments: main() function of a C program accepts arguments from command line or from other shell scripts by following commands. They are, argc argv where, argc    – Number of arguments in the command line including program name argv   – This is carrying all the arguments In real time application, it will happen to pass arguments to the main program itself.  These arguments are passed to the main () function while executing binary file from command line. For example, when we compile a program (test.c), we get executable file in the name “test”. … Continue reading C – Command line arguments