0
can we take any other data type instead of "int main".
if not why it is?.. cant be float or any others.
7 Answers
+ 3
void main
+ 1
Remember that, main is a function and functions have return types. So it depends on you. If you want to return a data type in your main, you can do it. The int is common because you most often do return 0 (an integer).
0
void
0
yes you can use void....but be careful because void dont return nothing...and this means that he don't need the return 0 statement to check if everything went OK and that is bad...hope that this helps ;-)
0
Yes, we can use void main() too.
0
thank you all of dears.
0
ofcourse