What is the difference between int main and void main | SoloLearn: Learn to code for FREE!

0

What is the difference between int main and void main

c

1/16/2021 6:39:36 AM

Md. Tamim Iqbal

3 Answers

New Answer

+1

Md. Tamim Iqbal int and void are return type. int returns integer value and void returns nothing.

+1

int main(void) { } is standard C and void main(void) { } is not - except in a few very rare cases. The return value is there to signal to the operating system if the program ran successfully or if it failed to execute.