answersLogoWhite

0

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()

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is the difference between declaration and a definition in C with small example?

declaration examples:int main (void);extern int somevariable;definition examples:int main (void) { puts ("Hello world"); return 0; }int somevariable;


How is main function declared?

int main (void) or int main(int a, char **p)


What is earlier declaration for main?

pick one: int main (void); int main (int argc, char **argv); int main (int argc, char **argv, char **envp);


Why to write void main in c programing?

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)


What is the role of void in functions of c?

this is a void main()int, char, are execution the program and it is not return the void.


In c How do you access variable declared in main in other function?

Only if you pass a pointer to it, eg: void sub (int *into) { *into= 3; } int main (void) { int myvariable; sub (&myvariable); return 0; }


How do you Send arrays to function?

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) { }


Types of main function in C programming?

minimalist: int main (void); standard: int main (int argc, char **argv); unix-only: int main (int argc, char **argv, char **envp);


Why do you write void to the first of main in c?

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.


Where does the main function starts and end in c program?

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[])


What is the function of void main in c language?

Actually, it is:int main (void)orint main (int, char **)the point where the execution of the program begins


A pointer to a function which receives nothing and returns nothing?

void (*funptr)(void); void fun (void); int main () { funptr = fun; funptr (); }