c++变量_C ++变量

c++变量In this section we will be studying the concepts of variables in C++ programming language. We hope you guys must have heard about variables in C or somewhere else. Though it is not a very complex...
摘要由CSDN通过智能技术生成

c++变量

In this section we will be studying the concepts of variables in C++ programming language. We hope you guys must have heard about variables in C or somewhere else. Though it is not a very complex topic to discuss in detail but let’s see what we have to say for this.

在本节中,我们将研究C ++编程语言中变量的概念。 我们希望你们一定听说过C或其他地方的变量 。 尽管讨论不是一个非常复杂的话题,但让我们看看我们要说些什么。

C ++变量 (C++ Variables)

We can see a variable as a ‘source of storage with some name’, which our programs can use for modification or manipulation. There is always a type associated with each variable which we need to specify at the starting of the program during variable declaration or we can also specify the type of the variable during initialization of that particular variable.

我们可以将变量视为“具有某些名称的存储源”,我们的程序可以将其用于修改或操作。 总是有与每一个我们需要指定在程序的变量声明在起动或我们也可以是特定变量的初始化期间指定变量的类型变量相关联的类型

The type of a variable determines the size of the variable’s memory ( i.e. how many bits can be accommodated within), layout of the memory, range of values that can be stored and the set of instructions that are permissible to be applied over the variable.

变量的类型决定了变量的内存大小(即,可以容纳多少位),内存的布局,可以存储的值的范围以及允许在变量上应用的指令集。

Things to keep in mind when naming a variable:

命名变量时要记住的事情:

Digits, letters and an underscore character is what allowed in the nomenclature of the variables whereas the variables name must start with a letter or an underscore only. C++ is a c

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值