1. What is a Variable?
The variable is the computer memory location that can store values for using and manipulating a program. According to the variables, it has two main parts. Those are names and data type. The two main parts mentioned above should be taken into consideration when declaring a variable. So the program and the developer can be more clearly understood. The developer assigns the required size storage space and correlates the name and data type form with this exact address.
2. Variable Declaration
As we mentioned above, there are two main parts to consider when expressing a variable. Those are name and date type. There must be some order in declaring it. That is, the data type must be specified first and the name of the variable second.
Variable Declaration |
3. Important points to consider when naming a variable
Example for good naming variable |
4. Do not use the following names for variables
- Avoid using numbers when naming variables.
- Avoid using similar ideas names
- Avoid names that sound similar
- Avoid using special names reserved for programming languages (ex: int, return, if, while, for….)
- C is case sensitive (uppercase and lowercase letters are different in C)
0 Comments