C language is a base to learn different programming language. If you want to learn C++ , JAVA,PYTHON,PHP and LIMBO without the knowledge of C it becomes very difficult to learn these programming languages. Many major components of popular operating systems like Windows, UNIX, LINUX is still written in C. Nothing beats C in terms of speed of execution.
Before starting with the programming, let’s have a look at the C Character set.
Any alphabet, digit or special symbol can be termed as a character. Below table shows list of valid alphabets, digits and symbols allowed in C.
Alphabets:
A, B, C, D, … ,X, Y, Z
a, b, c, d, … ,x, y, z
Digits : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Special Symbols :
~ ‘ ! @ # % ^ & * ( ) _ - + = | \ { }
[ ] : ; " ' < > , . ? /
Following are the basic data types:
1) Numeric data type: deals with numeric data such as integer or float data type
2) Non-numeric data type: deals with non numeric data such as characters.
3) Integer data type: deals with integer or whole number
4) Real data type: deals with numeric data that includes fractions
5) Enumerated data type: These data types are defined by the user
Before starting with the programming, let’s have a look at the C Character set.
Any alphabet, digit or special symbol can be termed as a character. Below table shows list of valid alphabets, digits and symbols allowed in C.
Alphabets:
A, B, C, D, … ,X, Y, Z
a, b, c, d, … ,x, y, z
Digits : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Special Symbols :
~ ‘ ! @ # % ^ & * ( ) _ - + = | \ { }
[ ] : ; " ' < > , . ? /
Following are the basic data types:
1) Numeric data type: deals with numeric data such as integer or float data type
2) Non-numeric data type: deals with non numeric data such as characters.
3) Integer data type: deals with integer or whole number
4) Real data type: deals with numeric data that includes fractions
5) Enumerated data type: These data types are defined by the user
A constant, Variable or a keyword can be formed from any combination of Alphabets, Digits and Special Symbols. A constant is an entity whose value does not change throughout the program execution.
A variable is an entity whose value keeps on changing throughout the program execution. However, it’s not a rule that the value of the variable will change. A variable value might remain same throughout the program execution. However the main difference between variable and constant is that we can’t change the value of constant in between the program, but we can change the value of the variable during program execution.
Let us take an example:
We define a variable named x in a program. Let us say x=3.
After some time during execution we change the value of x to 6. Now, x=6.
Here value of x is getting changed. But the value of 3 and 6 will never change. Hence, x is called a variable and 3 is called a constant.
Keywords are the words whose meaning has already been explained to the C compiler. The keyword cannot be used as the variable name. If we try to do so we are trying to assign new meaning to the keyword. The keywords are also known as ‘Reserved words’.
A variable is an entity whose value keeps on changing throughout the program execution. However, it’s not a rule that the value of the variable will change. A variable value might remain same throughout the program execution. However the main difference between variable and constant is that we can’t change the value of constant in between the program, but we can change the value of the variable during program execution.
Let us take an example:
We define a variable named x in a program. Let us say x=3.
After some time during execution we change the value of x to 6. Now, x=6.
Here value of x is getting changed. But the value of 3 and 6 will never change. Hence, x is called a variable and 3 is called a constant.
Keywords are the words whose meaning has already been explained to the C compiler. The keyword cannot be used as the variable name. If we try to do so we are trying to assign new meaning to the keyword. The keywords are also known as ‘Reserved words’.