Friday, August 15, 2014

In the above example the value 100 in the variable assignment operator IdCounter placed. If the var


Variables, constants, kangastukku input and output commands and operations at 11: 16 pm on Tuesday, 18 Bahman 1390 Keywords: Programming
Undoubtedly one of the strengths of a programming language is a variety of variables. # C programming kangastukku language, one of the richest languages in the remainder of this section, the counterparties Yd.dr #C data types and how they are defined, kangastukku the statements (Statements) and the input and output commands more familiar #C begins.
As the name implies, a variable that refers to the homes of RAM is a computer system that store data temporarily when run a program, and may be at any point in time, different doses of the will be studied. variable name and data type information in it is the most important feature of a variable. In #C Before using variables, you must define them. How to define variables in the # C is as follows:
If a variable is an integer kangastukku data type, just a string of digits 0 to 9 are stored. # C variable of type integer in the table is shown below:
short
8 bytes
According to the above table, we find that our measures how much memory and can occupy a range of numbers that can be stored in them how to. For example, it could be a number like 200-byte kangastukku variable data type and other data types such as short, ushort, int, unit, long, and ulong saved. If the data type byte, except for the Knbm selected, more memory is used to store and actually have it wasted.
If a variable is an integer data type, just a string of digits 0 through 9, the decimal point is contained in, stored on them. #C Variable kangastukku of type decimal in the table is shown below:
4-1-3) non-numeric data types
In the above example the value 100 in the variable assignment operator IdCounter placed. If the variable is not defined, but the initial value varies depending on the type of data to be defined in accordance with the following table will be initialized.
0
0.0
Note: The variables that are constant over the area of the memory and to transfer them to another area, does not require additional computations called Value-Type Variables. Of all types of data that has been mentioned, only variables with data type string and object variables kangastukku are not included in this category. Variables of type string or object and user-defined variables (which are discussed in the future), Reference-Type Variables are defined.
The constants for the maintenance of data in computer memory kangastukku during the execution of a program but, as their name implies, the value at which the program is fixed and does not change. # C constants defined in three categories, namely: Constants Literal, Symbolic Constants and Constants Enumeration.
Where the const keyword is used to define a fixed, data-type Specifies the data type constant for the definition of the types of data that we use to define kangastukku the variable, identifier name for what we consider a fixed and We will assign a value to a constant value. For example, to define a constant with a value of 3.14, we have the following number:
Where the enum keyword kangastukku and the identifier for the definition of Enumeration Enumeration is a name that is stationary. base-type constant defined kangastukku data type that is not defined by default int if we considered the enumerator-list is a list of members defines prove enumeration. For example, note the following:
In the example above a certain temperature at which water is in a constant state of change called enumeration Temperatures defined. For reading the enumeration type the name and identifier of each element and then a dot and then the name of the desired element is written. For example, to read the value of the constant WickedCold Temperatures are:
If we can be in # C data type of the variable at the moment, temporarily changed to another type which is called the casting process. This is enough to do that before the variable name, type the new data will be placed in brackets. kangastukku For example, note the following:
In our example, the data type of a variable is defined integer variable b is a floating point decimal. To transfer the value of a to b must be the same type of data that you temporarily change the data type by casting operation kangastukku was performed. Mqdra a variable of type float data type is changed to b transmitted.
# C programming language into the spaces, tab and new line (New Line), and the so-called Whitespace additional whitespace is skipped program lines. So we ordered:
Incoming orders called commands that can read information from the outside environment and inside the program used. Some of these command

No comments:

Post a Comment