+ 2

What Is the use of int main()

14th Apr 2017, 1:27 PM
Vishwas Mishra
Vishwas Mishra - avatar
4 Réponses
+ 16
Imagine you have a storybook, with characters and plots. The characters are the variables, the plots are your functions. The story itself, is your main(). The first page marks the starting point of your program, the last page returns 0.
14th Apr 2017, 2:12 PM
Hatsy Rei
Hatsy Rei - avatar
+ 8
Every program begins with the int main () You need a main () function for the program to work.
14th Apr 2017, 1:43 PM
Pixie
Pixie - avatar
+ 7
"main()" is the main fuction of the program, it's where the program starts to execute. "int" in front of "main()" says that it returns integer value.
14th Apr 2017, 1:46 PM
Gigi
Gigi - avatar
+ 2
Remove it from your code and you will see if it is useful or not.
14th Apr 2017, 8:05 PM
Denis Felipe
Denis Felipe - avatar