+1 Baba Iskandarov · January 5, 2016
int x = 15;
int y = 15;

x += ++y + 5;

(now x is 36)

in this statement ordinary is:
x + 5
x +=

Post a Reply


Oldest  Newest  Rating
0 Baba Iskandarov · January 11, 2016
its tip:)
+1 Linguist Llama · January 11, 2016
Nice. Those of us who read these forums do so in order to help people... Thus Krootushas prompting you for a question. We already knew this.

Don't get too clever. There's some undefined behaviour associated with modifying an object twice between sequence points, or trying to access an object and modify an object between sequence points. To understand what I'm saying, here's an example of what not to do:

int x = 15, y;
y = x++ + x; // NON-PORTABLE! x is modified in the same expression it's accessed in.
y = x++ + ++x; // DON'T DO THIS! x is modified twice between sequence points. VERY BAD!

Have you considered reading a book to facilitate your understanding of the C programming language? You might learn some of the more advanced topics much faster and with less problems this way...
0 Baba Iskandarov · January 14, 2016
Linguist Llama thank you for advice
  • 1



One of the most popular languages of all time.

Bucky Roberts Administrator