The Main Function of C programming
The Main Function
The main is a part every C program. C permits different forms of main state ment.following soms are allowed
- main()
- int main()
- void main()
- void main(void)
- int main (void)
The empty pair of parentheses indicates that the function has no arguments this may be explicitly indicated by sing the keyword void inside the parentheses . we may also specify the keyword int or void before the word main. The keyword void means that the function does not return any information t the operating system and int means that the function does not return any information to the operating system and int means that the function returns an integer value to the operating system. when int is specified the last statement in the program must be return 0" for the sake of simplicity , we use the first form in our programs.
Comments
Post a Comment