0

Why use int main()

I don't understand why int main is used, I mean the code includes words 99% so why int instead of char or string. n idk if they r used, I just started learning n I know this sounds so stupid but plz tell me someone

11th Sep 2017, 6:19 AM
mohsin khan
mohsin khan - avatar
2 Answers
+ 1
int main() main is a main function, whole program runs here and evrrything that you execute here will run if the code is valid you return INT because there is a thing in windows called ERROR CODE or ESCAPE CODE. this is what your code returns, a int. u do not want to tell something stupid so just read for a minute about error code and things will get clear
11th Sep 2017, 6:58 AM
Paul