<分区>
下面是我的 C 代码片段。
void main(){
int x = 7;
x = x++;
printf("%d",x);
}
输出:8
public static void main(String[] args){
int x = 7;
x = x++;
System.out.println(x);
}
输出:7
我不明白为什么这两种语言给出不同的输出。 我在下面提到了链接 What is x after "x = x++"?