Name: Anonymous 2011-11-06 5:10
Okay, I get this much:
C does two kinds of memory management: Manual allocation from the heap (malloc, free) and automatic allocation from the stack.
Most functions take char pointer arguments instead of a char array as the string. Additionally, it seems pointers and array share a very odd relationship, so that x[y]=y[x].
What would be a good way to familiarize myself with the concepts of C and its way of dealing with memory? Jumping into the cold water, try to get as far as possible and learning by segfault or is there decent literature on the topic?
C does two kinds of memory management: Manual allocation from the heap (malloc, free) and automatic allocation from the stack.
Most functions take char pointer arguments instead of a char array as the string. Additionally, it seems pointers and array share a very odd relationship, so that x[y]=y[x].
What would be a good way to familiarize myself with the concepts of C and its way of dealing with memory? Jumping into the cold water, try to get as far as possible and learning by segfault or is there decent literature on the topic?