The ANSI standards donât require a program with main returning anything else other
than an int, including void, to fail.
But certainly, programs with main not returning an int are unsafe and their behavior
is unreliable should anything goes wrong.
'void main' however, certainly removes a few errors for a person who is not bothered
about whatâs right and whatâs wrong and just trying tooth and nail to get his program
to compile at all- so many books these days show program with main returning void, and
many compiler wont even flag a warning on that, but the fact remains that âvoid mainâ
is incorrect.
I gather that is what you were trying to say with your query -âwhere did u learn thatâ
and not asking me the name of the university I went to, right SunnyPal?
Thanks for pointing that out.
Well, when I see something I donât agree with in a post, I just post my point of view on
that with what I think is the corrected version of the info in the post. I find that more
constructive. But thatâs me.
People who are well informed, are always welcome to this forum.
If they could help others as well
- better yet.
Regards
Ankur Verma
|