Header Ads

         C Programming - Lecture 2:
Expressions, variables, and the name and reserve Word

 Expressions (Expression)

We use a variety of expressions for computer programming. 
Below are a few expressions are:
1 + 3 
5 > 9
Expressions always have a value. 4. The value of the expression as a "Numerical Expression". The expression of these values ??can be any number.
The second eksapresanata a Boolean Expression. The value of the expression must be TRUE or FALSE. The second expression of our values ??FALSE.We have 13> 6 If you write a Boolean Expression, which will also value TRUE.Both of our program will be widely used expression.Variables
We'll run our programs so that the computer may have different amounts of RAM or memory. We 1GB, 2GB, 4GB, 8GB memory size, etc., view the computer (01 AD). Random Access Memory, or RAM memory that we just who definitely.
Each is marked with a number of memory baitake. A computer with 4 GB (4294967296 bytes) of memory, we do baitaguloke marked with numbers from 0 to 4294967295. We call these numbers memory addresses (address). The value of memory is needed to keep the program running while.
For example, we have an address of 1000 'A' I want to write. We can say that if the CPU
[1000] <- 'A'
But the number of programs written using kubai inconvenient. That is why we do not address the different memory addresses to identify the type we use different names. 1000 addresses can say that we have such grade.
So we can say that the CPU in grade 'A' rakhateh
grade <- 'A'
Here's the thing to keep in mind the addresses are named for the benefit of our people to understand. It marks the end of the numbers by the compiler, but it left us without knowledge.
So memory addresses are marked by the names of the variables we call them. The value of which can be anytime.
Variable declaration
To use language such as C variables is to declare it first. This means that the first bhiriyebalera Declare name and its type to be written. What is language such as hail it.
For example:
int number;
Thus we declare an integer variable or ints, which bear the name of the number.
If a variable of type int is always confer its (usually) can be filled with the number.
Assignments (Assignment)
We are one of the variables that can be any time or assign a value to it. 
This is the first we have to write the name of a variable, then write expression after the = sign.
Below are two examples of such are:
NUMBER = 5; 
NUMBER = 3 + 5-1;
The computer is always right the first expression of the value of the variable on the left of the symbol = and then taken out and put in.
Identifier named

C language such as variables, functions, etc. There are some restrictions in the name.
We are here to create the set of 4, we will be able to use the identifier.
1. _ 
II. az 
3. AZ 
4. 0-9
1, or 3 sets of numbers from the beginning, then any one will take any set if you wish to be taken as a sign of happiness. 
So, at the beginning of the identifier number (1,2, etc.) can not be. However, the _ (underscore) will be given.
Sathikah
ABC 
num1 
city 
salary 
memberid
Bhulah
2ndcar 
customer #
Reserve Ward

We have our own language such as C word as identifier can not encrypt passwords. Which reserve Ward said. The reserve can be used for specific keywords just for them.
Refer to the following list 12 times. They are (or anything else of course) do not need to try to memorize.
auto wheather break integer case lenthy char register continue return default short do size of double. 

No comments:

Powered by Blogger.