Fedora: Re: C Programming
“The C++ Programming Language” Stroustrap and int main(void) and even int main()…in “The C Programming Language” Kernighan/Ritchie. Anyways, void main(void) is a bad example to use to make a point against an author without giving a book and page number. I have not seen where Schildt says to use or uses void main(void) in any book I’ve seen. In the complete reference I can turn to the index page 1003 look in M and find a reference to page 153 (main, return value from) (in the complete reference). Now, if I turn to page 153 I’ll find (as I should):
” 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….
Contrast this book to “The C++ Programming Language“. I happen to like Stroustrap’s book, but it is a little hard to read at times. It isn’t because the subject is very complicated either. It is just laid out a little strange (in my opinion), and isn’t as nice to read as “The Complete Reference: C++”. It just doesn’t seem to flow as well is what I’m saying. This in no way means that Stroustrap’s book isn’t useful or doesn’t have a lot of good info. I happen to like them both, but I don’t believe Schildts writing is bad nor incorrect either. Remember that I’m talking about “The Complete Reference: C++” as the example here…..
Download Fedora: Re: C Programming.Pdf
July 10, 2009 | Posted by admin
Categories:
Tags: