您的位置:首页 - 题库 - C#题目
下面代码的输出结果是:
int x=5;
int y=x++;
Console.WriteLine(y);
y=++x;
Console.WriteLine(y);




上一题 下一题
int x=5;
int y=x++; //这句先把x赋值给y(y为5),然后x加1变为6.
Console.WriteLine(y);
y=++x;//这句x先加1变为7,再赋值给y(y为7)
Console.WriteLine(y);
收藏 列表
评论:

导航