+ 2

What is difference of void main() and int main()

Void main() and int main()both are use in c and c++

6th Mar 2021, 4:03 PM
Fahad Ahamed
Fahad Ahamed - avatar
2 odpowiedzi
+ 5
int main() //returns an int *why return 0 is used void main() //returns nothing. it may do something else though like print text
6th Mar 2021, 4:09 PM
Slick
Slick - avatar
0
Void main() means function don't return any value after execution . And int main() means function return something or 0
8th Mar 2021, 6:19 AM
Rk Sri