int main() refers that main function returns an integer value, where the integer value represent the program execution status. This status value is sent to the Operating System. If you follow strictly follow the rules, then it should be int main not void main()
int main (void) or int main(int a, char **p)
pick one: int main (void); int main (int argc, char **argv); int main (int argc, char **argv, char **envp);
Simply by sending the base address from main() and catching that in a pointer in the pointer. void main() { int a[20]; sort(a); } void fun(int *p) { }
The entry point of a C program is the main function.The function signature might be like one of these:1. int main (void)2. int main (int argc, char *argv[])
Actually, it is:int main (void)orint main (int, char **)the point where the execution of the program begins
declaration examples:int main (void);extern int somevariable;definition examples:int main (void) { puts ("Hello world"); return 0; }int somevariable;
int main (void) or int main(int a, char **p)
pick one: int main (void); int main (int argc, char **argv); int main (int argc, char **argv, char **envp);
it is always not necessary to write "void main " in c programming.it depends on the source code we use if we have to return a value then void is not necessary because void returns the null.While coding in borland C++ we need to write void main but we dont need it in dav c++.In C (and C++) the standard allows int main (void) and int main (int argc, char **argv)
this is a void main()int, char, are execution the program and it is not return the void.
Only if you pass a pointer to it, eg: void sub (int *into) { *into= 3; } int main (void) { int myvariable; sub (&myvariable); return 0; }
Simply by sending the base address from main() and catching that in a pointer in the pointer. void main() { int a[20]; sort(a); } void fun(int *p) { }
minimalist: int main (void); standard: int main (int argc, char **argv); unix-only: int main (int argc, char **argv, char **envp);
This is really unclear. If you're asking why you should write void main() then the answer is that you shouldn't. main can return an int as an error code, so it's better to do int main() instead.
The entry point of a C program is the main function.The function signature might be like one of these:1. int main (void)2. int main (int argc, char *argv[])
Actually, it is:int main (void)orint main (int, char **)the point where the execution of the program begins
void (*funptr)(void); void fun (void); int main () { funptr = fun; funptr (); }