Message from C, C++ discussions

December 2019

— Why?


If a is assigned to be b then why is it changed later when you have already said that the assignment is done first.

— Yes!

— I just started learning c and am stuck in getting the concept of pointers and dynamic arrays and i want someone who can recommed a good book or other sources thank you

Message permanent page

— There's a youtube channel "mycodeschool"... They have explained and implemented it very well... Search for pointers playlist in that channel

Message permanent page

— As far as I understand, its not guaranteed here that a+b or a=b will be calculated first (at least before C++17). So this expression not guaranteed to work the same on all the compilers.

In this case we can parse the expression as a tree (picture below), it's evaluated from top to bottom. We can't evaluate minus before we evaluate both a+b and a=b, but as far as I know the order of these two can be any.

Message permanent page

— I can be wrong, though. But I don't see any guarantees about operators specifically.
Also check out this

Message permanent page

— Not in c but in c++

— 2,5

— .

— 2,5

— Oh god..