The compiler needs to know where a program starts. This is called the entry point of a program. The main function is just the standard way of denoting where the entry point of your program is.
since, the word 'void' in C programming language means that it does not return any value to the user or calling function....this is usually used to specify a type of function...... for this reason w use 'void'in c program..
#include <stdio.h> int main (void) { puts ("Marry me"); return 0; }
To return the exp. or const to the main fumction.
main void void void (void) { float temp1 [13]= {1,4,2,3,4,5,7,88,9,4,3,23,12};
Call by reference means calling a function using a reference to a variable or a pointer. You call a function by passing refrences to a variable. For eg: void x(int &a) { a=2; } void main() { int s=3; x(s); } OR void a(int &c) { c=5;}void main(){ int *p; *p=2a(*p);}
In C-programming: int main (void) { return 0; }
Not all host environments make use of a C program's return value, thus some implementations still allow the void main function signature. C++ does not permit it, however. All C++ programs must return an integer whether the environment uses it or not.
since, the word 'void' in C programming language means that it does not return any value to the user or calling function....this is usually used to specify a type of function...... for this reason w use 'void'in c program..
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)
#include <stdio.h> int main (void) { puts ("Marry me"); return 0; }
They're things that keep the variables in line with the void main and your functions
Because you misunderstood something. The correct usage: int main (int argc, char **argv)
it returns nothing
int main (void) {puts ("day is holyday");return 0;}
You don't use 'VOID', but 'void'. It means different things, such as:- void as function type means no return value- void as function parameter means no parameters- 'void *' as pointer-types means generic pointer
Is this question about programming? If so, try this:int main (void) { puts ("ABC"); return 0; }
int main (void) { puts ("Cosine of 60° is 1/2"); return 0; }