1 Answer - Sort by: Date | Rating
A quantity whose value may change during execution of the program is called variable. It is represented by a symbol or a name.
A variable represents a storage or memory location in the computer memory. Data is stored into the memory location. The name of the memory location i.e. the variable name, remain fixed during execution of the program but the data stored in that location may change from time to time.
Rules for writing variable names
The following are the rules for writing variable name in a program in C++:
1. The first character of variable name must be an alphabetic.
2. Underscore can be used as first character of variable name.
3. Blank spaces are not allowed in a variable name.
4. Special characters such as arithmetic operators, #,^ can not be used in a variable. Reserved words cannot be used as variable names.
5. The maximum length of a variable name depends upon the compiler of C++.
6. A variable name declared for one data type cannot be used to declare another data type.
7. C++ language is a case sensitive language. Thus variable names with same spelling but different cases are treated as different variable name e.g. A and a are two different variables.
A variable represents a storage or memory location in the computer memory. Data is stored into the memory location. The name of the memory location i.e. the variable name, remain fixed during execution of the program but the data stored in that location may change from time to time.
Rules for writing variable names
The following are the rules for writing variable name in a program in C++:
1. The first character of variable name must be an alphabetic.
2. Underscore can be used as first character of variable name.
3. Blank spaces are not allowed in a variable name.
4. Special characters such as arithmetic operators, #,^ can not be used in a variable. Reserved words cannot be used as variable names.
5. The maximum length of a variable name depends upon the compiler of C++.
6. A variable name declared for one data type cannot be used to declare another data type.
7. C++ language is a case sensitive language. Thus variable names with same spelling but different cases are treated as different variable name e.g. A and a are two different variables.
0
0
- How Do Wok Magnate In Atm Machine?
- What Are The 5 Basic Types Of Files?
- How Does The Emission Trading Scheme Work?
- What Is Parallel Transmission In Computer Network And What Is The Advantage And Disadvantage Of This Transmission?
- How To Setup Screen Saver Lgks360?
- What Dogs Are Best To Have If You Live In A Duplex?
- How Do I Increase Memory Space On Propel Pro?
- Hey, Does Anybody Know Anything About The Arctic Cooling Freezer 64 Pro 92mm CPU Cooler? If So, Then This Cooler Is Designed To Be Able To Be Used On An AM3 Processor, But I Want To Know If I Can Use It On An AM3 Processor. Help Is Much Appreciated:D
- What Is Mlma Protocols?
- Can You Flash The Iphone?
- Is There A Website Sort Of Like Baby Dow?
- What Is Configure Command?
- How DoI Create A New Screen Name?
- What Are The Importance Of A Government?
- How Do I Get A Blank Piece Of Paper On My Computer So I Can Write A Report?
- How Do You Add A PC To A Network?
- How C I Download My Lexmark X3430 Printer Back To My Computer?
- Why We Need Maintenance System In Hotel?
- Where I Can Find Computers Ip Adress?
- How To I Bought A Computer Without The Recovery Cd How Do I Fix It?
- How To Import Zipped Files To Software Program?
- Why Is It Very Difficult To Make The Hard Disk Faster?
- What Is The Best Processor?
- How To Correct Stuffing That Is Too Salty?
- What Is The Password You Use To Get At The End Of The Arcade On Fun Brain?
- What Are The Rules For Paragraph Writing?
- What Are Rules For Writing XML ?
- Does Anyone Know A Website That Tells You Some Of The Rules For Writing A Book?
- What Are The Golden Rules Of Writing Text For My Web Site?
- What Are The Basic Rules For Writing Well Formed XML Documents.
- How To Find Great Vampire Names For Writing This Book That I Want To Do?

New Comment - Comments are editable for 5 min.