Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Kc language definition molding
Kc language definition molding
k=3 j=4

Because there is a comma expression, k+=j is executed first.

At this time, k=7 j=4.

Then execute j/=4.0. Although the result of the operation is 1.0, j= 1 because j is an int type.

At this time, k=7 j= 1.

Execute ++j

At this point j=2.

The last comma expression is j+2, and the value of this expression is 4.

Since the comma expression takes the last expression as the value of the expression, the value of the whole expression is 4.

The value of k is 7.