+ 1
How can I define main function in C language while taking command line input...?
This means defining main function of a command line input program.
4 ответов
+ 2
int main(int agrc, char* argv[])
{
...
}
Edit : Rishabh Deo
Check these, you can find seniors explanation..
then for any further, give a reply...
https://www.sololearn.com/discuss/1021914/?ref=app
https://www.sololearn.com/discuss/1654730/?ref=app
https://www.sololearn.com/Discuss/210063/?ref=app
https://www.sololearn.com/discuss/2490999/?ref=app
+ 3
int main(int argc, char *argv[])
One standard form of the head of function `main`, which is called automatically, in practice after initialization of namespace scope variables.
The arguments `argc` and `argv` can be used to access command line arguments and the name that the program is invoked with. Since they're not used in this program they will instead possibly cause undesired warnings. It's better to omit them when not used, i.e.
⋮ int main()
+ 2
int main(int argc, char *argv[])
OR
int main(int argc, char **argv)
visit here for detailed explanation 👇
https://www.geeksforgeeks.org/command-line-arguments-in-c-cpp/amp/
+ 1
Could you please explain it..?