Sunday, 7 June 2015

The main Function:

The main is a part of every C program.C permits different firms of main state ment.
Following forms are allowed:-
1.main() main()
3.void main()
5.void main(void) main(void)

The empty pair of parentheses indicates that the function has no arguments.This may be explicitly indicated by using 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 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 frist form in our programs.

No comments:

Post a Comment