what is the difference between main() and void main() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is the difference between main() and void main()

14th Jun 2016, 12:27 PM
anirudh
anirudh - avatar
2 Answers
+ 3
Void main() return nothing.Int main() return a integer.Sometimes this integer is usefull to know if the program finishe without error.
14th Jun 2016, 1:35 PM
Silvio Romao
Silvio Romao - avatar
+ 2
main() return integer value whereas void main () returns nothing.
14th Jun 2016, 12:47 PM
Tauseef Siddiqui
Tauseef Siddiqui - avatar