0
What is difference between int main and void main how it works and what is use of return value in c language
2 ответов
+ 7
Take a look at the thread comments here by Shadow and the referenced links within that thread:
https://code.sololearn.com/cAwY3si7Udbw/?ref=app
Her initial response was:
"You might not 'need' the return value right now, nonetheless void main() is not correct C++ according to the standard."
+ 1
int main means at the end of main it should return a integer value, so at last line in main function we write return 0
Void main means at end of main, it should not return any value, so we don't use return. We cab use getch(); for void main