The main() function returns an integer to the calling process, which is generally the
operating system. Returning a value from main() is the equivalent of calling exit()
with the same value. If main() does not explicitly return a value, the value passed
to the calling process is technically undefined. In practice, most C/C++ compilers
automatically return 0, but do not rely on this if portability is a concern.
C C++ Source Codes, C C++ Practical examples ,C C++ tutorial ,Your best resource for Learning C and C++
Showing posts with label Does. Show all posts
Showing posts with label Does. Show all posts
Wednesday, September 29, 2010
Monday, September 27, 2010
What Does main( ) Return?
The main() function returns an integer to the calling process, which is generally the
operating system. Returning a value from main() is the equivalent of calling exit()
with the same value. If main() does not explicitly return a value, the value passed
to the calling process is technically undefined. In practice, most C/C++ compilers
automatically return 0, but do not rely on this if portability is a concern.
operating system. Returning a value from main() is the equivalent of calling exit()
with the same value. If main() does not explicitly return a value, the value passed
to the calling process is technically undefined. In practice, most C/C++ compilers
automatically return 0, but do not rely on this if portability is a concern.
Subscribe to:
Posts (Atom)