Essential C (2003) [pdf]
31–40 of 84 posts
Re: Essential C (2003) [pdf]
#32I don't want to learn C but certain types of applications there's really no practical alternative.
Re: Essential C (2003) [pdf]
#33Earlier quoted context omitted.
Hmm, I think `for (i = n - 1; i >= 0; --i)` is way clearer and maybe more common? edit: Ah unsigned underflow. :O
Yeah, so then you write for (size_t i = n-1; i It works fine (unsigned overflow is well defined) but it's even less clear.
Re: Essential C (2003) [pdf]
#34Earlier quoted context omitted.
Yeah, so then you write for (size_t i = n-1; i It works fine (unsigned overflow is well defined) but it's even less clear.
size_t is unsigned? Since when?
> The type size_t is an implementation-defined unsigned integer type that is large enough to contain the size in bytes of any object ([expr.sizeof]).
Re: Essential C (2003) [pdf]
#35This, paired with their Pointers and Memory [1] guide are how I learned C in college. They're both pretty short and to the point, I would highly recommend. [1] http://cslibrary.stanford.edu/102/PointersAndMemory.pdf
That and other useful links are listed in the parent page of this pdf. http://cslibrary.stanford.edu/101/
Does 'advanceed' mean 'more advanced than advanced?' [1]
Re: Essential C (2003) [pdf]
#36https://www.amazon.com/Primer-Plus-5th-Stephen-Prata/dp/0672...
My version was older than the Amazon version as I learned in 1987.
Re: Essential C (2003) [pdf]
#37This, paired with their Pointers and Memory [1] guide are how I learned C in college. They're both pretty short and to the point, I would highly recommend. [1] http://cslibrary.stanford.edu/102/PointersAndMemory.pdf
That and other useful links are listed in the parent page of this pdf. http://cslibrary.stanford.edu/101/
Example: http://www.cs.stanford.edu/cslibrary/PointerFunCBig.avi returns 404. :(
Re: Essential C (2003) [pdf]
#38Although some feel like it’s too opinionated to belong in this article I really appreciated the above. Edit To be clear the author is advocating for simpler syntax here to increase program readability. This could be taken other ways.
Re: Essential C (2003) [pdf]
#39Re: Essential C (2003) [pdf]
#40This is a pretty neat guide if you’re cheap and have moral qualms about pirating K&R. Still, I think the best introduction to C remains K&R.
K&R is woefully out of date. Gives you no info on how to do things safely and sanely. And encourages a leet style of programming that results in catastrophic edge case bugs. As you can see in comments above where naive code that iterates backwards through an array fails when the array size is 0. Worse K&R leet style buys you absolutely nothing with a optimizing compiler written in the last 30 years.