Message from C, C++ discussions

December 2019

— 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

— Not in c but in c++

— 2,5

— .

— 2,5

— Oh god..

— Another one bites the dust...!
Banned Deepak.

— Btw care to explain

— User Daniyal has 1/2 warnings; be careful!
The latest warn was because:
whatsapp chat

— Void recursionBubble(int* arr, int size, int i, int j, int n){

printf("i = %d n = %d\n", i, n);
if(i >= size / sizeof(int)){


if(n >= size / sizeof(int))recursionBubble(arr, size, i + 1, 0, 1);
if(arr[n] < arr[j]){

swap(&arr[n], &arr[j]);
recursionBubble(arr, size, i, j + 1, n + 1);

recursionBubble(arr, size, i, j + 1, n + 1);

Message permanent page

— Why do i get seg fault