New course! Every coder should learn Generative AI!
Try a free lesson+ 3
int main() needs to return statement for the exit status of program.
while void main returns always 0 as exit status.
int main() is the correct way to start program.
but some compilers (visual c++ compiler)
use void main to start program.
learn more.
https://www.quora.com/Why-do-we-use-void-main-or-what-is-its-significance-in-C-programming