+ 2
In c++ when we use return 0,and without return 0 show sqme result. Why??
What is its use or difference??
3 Respuestas
+ 3
A program will return a number to the operating system to tell it how the execution went. A 0 value means the execution went well, whereas a non-0 value means there was an error. For example if you run "ftp localhost" and you don't have a server, it might return a non-0 value to let the OS know it wasn't able to do what it wanted.
If your main() function doesn't return a value, the compiler may return 0 by default, but it's undefined behavior.
+ 2
any easy way for this
+ 1
Can you attach your code here?