0

Is it necessary to start main function using int main??

18th Feb 2017, 6:48 AM
sumit dhar dwivedi
sumit dhar dwivedi - avatar
7 Answers
+ 3
the return type can vary eg. int , void ... but yes the function name must remain main
18th Feb 2017, 6:52 AM
Akshata
Akshata - avatar
+ 2
did your main function end with return 0;? you can't use return when using void.
18th Feb 2017, 7:00 AM
Mario L.
Mario L. - avatar
+ 1
int main () is not necessary but main function is necessary....
18th Feb 2017, 6:52 AM
Muhammad Ahmad Raza
Muhammad Ahmad Raza - avatar
0
but I have tried void main but output showing error showing necessary to use int main
18th Feb 2017, 6:55 AM
sumit dhar dwivedi
sumit dhar dwivedi - avatar
0
you are allowed only one to choose for a program. which one? depending on your program's nature
18th Feb 2017, 7:00 AM
Muhammad Ahmad Raza
Muhammad Ahmad Raza - avatar
- 1
Yes
18th Feb 2017, 6:49 AM
Ethan Vastbinder
Ethan Vastbinder - avatar