+ 3

What is the parameter of "int main()" in C ? Does this even take any?

Hey, could anyone tell me how this parameter works? Is it possible to link two int main() file or sub(just another page) program?

29th Jan 2018, 10:01 AM
Akib
Akib - avatar
2 Respostas
+ 5
These are passed to a C program through two arguments to the main() function. The parameters are called argc and argv. These parameters are optional and are not used when no command-line arguments are being used. The argc parameter holds the number of arguments on the command-line and is an integer.
29th Jan 2018, 10:06 AM
Scooby
Scooby - avatar
+ 4
main is entry function and start point for every program. You can have more than one main function, that is knowing as function overloading.
29th Jan 2018, 10:05 AM
Vukan
Vukan - avatar