+ 2
What happens if i didn't write return 0; at the end of my program ?
Return 0;
16 odpowiedzi
+ 2
I know. But I wanted to delete the return 0 to see if something will change. But nothing happened .
+ 1
Dude. If I deleted the return 0 and my program ran Normally then why would I use it ?
+ 1
If I'm confident that my program will misbehave I don't write it. Then most of my programs will misbehave from the first time because of some mistakes will this mean that I don't permanently write a program again because of some mistakes ?
+ 1
Thanks for the information.as for the last couple of lines. Well your reply made me say the last couple of lines. Because every program must have some errors. Big programs especially. That's what I was trying to clarify about misbehaving of program.you see..If you saw programmers. A lot of us think that they don't make single mistake when one program contains more than one or more mistakes. And your telling me that if my program misbehaved then i shouldn't write it. That's what I was trying to clarify.
+ 1
I didn't say that return 0 is not important and what i meant by i shouldn't write it in the reply i didn't mean that i shouldn't write it permanently as I mentioned in the first reply of you saying the misbehave thing. what i said for the return 0 is why I would write it if without it my program will still work that's what i know about the return statement
+ 1
Did I say that return statement is not important ?
+ 1
That's what i just said when I asked the question the program will work fine without it. I didn't say it isn't important what I said is that my program will work fine without it that's what i exactly wanted to say.
+ 1
Yeah i said why should I write it but didn't say it isn't important and that's what I wanted to know is that why my program works fine without it thanks to your explanation I understood.Thanks for your awesome explanation as always.