为变量赋值 [英] assigning a value to a variable

查看:73
本文介绍了为变量赋值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好, 

Hello everyone, 

执行以下语句后,变量
height 的值是多少?它是0还是50?

After the execution of the following statements, what is the value of the variable height? Is it 0 or 50?

int age = 50;

int age=50;

int height;

int height;

age = height ;

age = height;




谢谢。 

推荐答案

您可以使用Visual Studio中的调试器进行自我检查。  

You could have checked yourself by using the Debugger in Visual Studio.  

https://www.dotnetperls.com/debugging

https://www.dotnetperls.com/debugging


这篇关于为变量赋值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆