When we write int main ()
Then why should we not write float int ().
0lease answer
C++ int main() doubt
Hey @mayankgupta
I think u are asking why always
int main()
and not
float main()
or something.Right?
int main() is used to denote the exit status of the program after completion if use int main then we would have to specify how we finished our program as in by mentioning return 0 or return 1….return 0 denotes successful completion of the program without any error and any other number like return 1 denotes the program quit but had an error.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.