T
TefJlives
Hi all,
I'm learning a bit about C, and I have a few questions. I'm not trying
to insult C or anything with these questions, they're just honestly
things I don't get.
It seems like pointers to chars are just how you deal with strings, and
pointers to pointers to char just give you arrays of strings. What is
the advantage of this vs. languages with a string type?
What is the advantage of things like malloc to allocate memory, vs.
languages that just do it for you?
What the heck is up with static memory allocation vs. dynamic? And,
again, why does one want to deal with this vs. just having a computer
do it for you? Especially now with computers having so much memory.
Does C lie somewhere between assembly language and most others in some
sense? As in, is C closer to assembly language than most others?
Thanks.
Greg
I'm learning a bit about C, and I have a few questions. I'm not trying
to insult C or anything with these questions, they're just honestly
things I don't get.
It seems like pointers to chars are just how you deal with strings, and
pointers to pointers to char just give you arrays of strings. What is
the advantage of this vs. languages with a string type?
What is the advantage of things like malloc to allocate memory, vs.
languages that just do it for you?
What the heck is up with static memory allocation vs. dynamic? And,
again, why does one want to deal with this vs. just having a computer
do it for you? Especially now with computers having so much memory.
Does C lie somewhere between assembly language and most others in some
sense? As in, is C closer to assembly language than most others?
Thanks.
Greg