>start to learn C
>polish notification calculator tutorial
>stack, pointers mumbo jumbo
is it possible to be to dumb to learn C /g/ ?
Are you kidding brah? C is for dumb people. The classic C book is like 100 pages long.
Now learning C++ and being dumb is nye impossible. It's the reason a lot of people hate C++ (dumbos who can't memorize more than 8 reserved language words)
>>51924920
C is really easy to learn. It's just annoying and takes a bit of time for the concepts to really sink in.
Just learn C enough then go over to C#. I think you'll enjoy C# a lot.
>>51924920
>too dumb to learn
yes
>>51924920
Start simpler. Get basic logic down first. Then do pointers and stucts and poke around the standard library. C isn't terribly hard or easy. If you keep having problems, do some projects in python then go back to C.
>>51924997
Can you link this book please
>>51925048
no.
You can be slower than others, but you are not "too dumb" to learn something. Start easy, step by step and repeat every step, if you dont understand it.
node * pushItem(node * stackTop, int number)
{
static node * newItem;
newItem = calloc(sizeof(node),1);
newItem->numdata = number;
newItem->nextnode = stackTop;
return newItem;
}
kill me
>>51925109
Spoken like a true retard.
>>51924920
OP, it's too late. Give up. You're just too dumb.
>>51925110
Why do people put * in the middle? It looks so confusing just write it like:node *pushItem(node *stackTop, int number)
{
static node *newItem;
newItem = calloc(sizeof(node),1);
newItem->numdata = number;
newItem->nextnode = stackTop;
return newItem;
}
>>51925110
Why fill the memory with ones?
>>51925110
what is this
>>51925177
most other languages do this implcitly
if you're not going to be overwriting that data immediately, you should be zeroing it out to prevent undefined behavior.
>>51925208
A stack implementation.
It creates a new stack node, assigns data to it, and returns it's pointer to the function that called it.
>>51925149
>Why do people put * in the variable? It looks so confusing just write it like:node* pushItem(node* stackTop, int number)
{
static node* newItem;
newItem = calloc(sizeof(node),1);
newItem->numdata = number;
newItem->nextnode = stackTop;
return newItem;
}
>Kahnacademy.org
Goodluck
>>51925227
preach
>>51925227
Most of the time you use that *newItem pointer, it will be dereferenced.
You might as well put the star on the variable.
>>51925227
masterrace
>>51925099
Not him but idk how you haven't heard of it.
K&R The C Programming Language version 2
>>51925227
>>51925254
>>51925266
Why do you cuckolds do this?
Whenever I see your code and I notice that i immediately stop reading it
>>51925320
It's the same people who do (char*) and not (char *) when casting.
Literally 0/10 would not compile.
>>51925212
But they are writing data immediately after.
>>51924920
Dumb frog poster.
>>51924920
>is it possible to be to dumb to learn C
Yes. Bu the good news is, by the very act of deciding to learn C, you have proven that you are smart enough to learn it. Dumb people don't decide to learn programming languages.
Do you know other languages already?
>>51924920
>stack, pointers mumbo jumbo
>mumbo jumbo
With this mindset, you will not learn.
>>51925227
This is actually wrong.
Following that logic, you'd think that by looking at the following:int* a, b;
that b is a pointer because of your retarded syntax preference.
But really the * is part of the variable, not the type, and understanding that it should be obvious that the line above should actually be:int *a, *b;
>>51924920
If can't into pointers there is no use to be developer at all. You're too dumb for this job.
>>51924997
Are you literally retarded?
>mumbo jumbo
That's why you're not learning, stop scaring yourself like that, there's nothing complicated about any of it
Ooooh pointers, omg so scary. It's just a damn variable that holds a memory location rather than the age of your grandma, that's all there is to it.
Keep reading and practicing dude.
Do you need to know C to learn C++?
>>51927791
Learning C before learning C++ would be beneficial, not just for C++, but for programming in general. C is a great first language.
>>51925026
>switching from a low level language to a high level language
shouldnt it be the other way around? C# and Java is great for beginners.
>>51927828
Nah, after dicking around with lower level you understand how things are working for real and you can truly admire comfy and beauty of hll
>>51925212
>zeroing it out to prevent undefined behavior
dumbass
>>51927515
This changed my mind. Well done. * is now going on the variable
>>51927804
This
>>51927791
Most people say no but after learning C first and then trying C++ i know that these people are wrong
>>51928144
Doesn't stop me personally because the variable is still called "a" and not "*a", and the only reason that behavior is there is so you can do retarded shit like "int a*, b"