Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does C calculate the values of x and y?
How does C calculate the values of x and y?
The assignment statement in C language is executed from right to left.

For example, x = y+ 1, which means adding y to 1 and assigning it to X.

But the word order of C language is executed from top to bottom.

In this problem, when executing int x, y; After that, X and Y have no initial variables and should be random numbers.

So your x = y+1; This sentence is meaningless. X is still a random number.

And the latter y = 3+25;; Y can be assigned to 28;

printf(); Is the format of the output statement, printf("x=%d, y =%d ",x, y); //The output format is enclosed in quotation marks, and %d is a variant after x and y, which means output by shaping.