Hi,
I am trying to get an understanding of main( ) functions with arguements.
I read in a book where the code had some thing like this
[code=c]
int main(int argc, char *argv[])
{
/* Lines of codes in the body of main function */
}
[/code]
Question is that main always have only this arguement? Can we make up something like this?
[code=c]
int main(int x)
{
printf("%d\n", x);
}
[/code]
Regards,
Alien
I am trying to get an understanding of main( ) functions with arguements.
I read in a book where the code had some thing like this
[code=c]
int main(int argc, char *argv[])
{
/* Lines of codes in the body of main function */
}
[/code]
Question is that main always have only this arguement? Can we make up something like this?
[code=c]
int main(int x)
{
printf("%d\n", x);
}
[/code]
Regards,
Alien
Comment