Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - If double t is defined; Then the expressions t = 1, t+5, the value of t++ is _ _ _ _, and the value of t is _ _ _ _ _.
If double t is defined; Then the expressions t = 1, t+5, the value of t++ is _ _ _ _, and the value of t is _ _ _ _ _.
The expressions t = 1, t+5 and t++ are comma expressions.

The form of comma expression is as follows:

Expression 1, expression 2, expression 3, ..., expression n

Key points of comma expression:

The operation process of (1) comma expression is to calculate the expression one by one from left to right.

(2) The comma expression as a whole, its value is the value of the last expression (that is, expression n).

The expressions t = 1, t+5 and t++ are calculated as follows:

Assign 1 to t first, then add 5 to t (but not to any variables), and then do self-increment operation on t.

T++ means to take the value of t first and then add it yourself.

So the expressions T = 1, T+5, the value of t++ is 1, and the value of t is 2.