Now we find application of C Language almost everywhere. The C language has immense potential within and it is very powerful, efficient and compact. Learning C is very easy, it is a very simple language. This article will make you a bit familiar with the terminology used in C language and it will answer a basic question that “what is C and what are its features”.
It was made by Dennis Ritchie in 1972, at that time it became very popular (its popularity can be guessed by the fact that after so many years it is still taught to students of engineering background). Some reasons which made it popular are:
- This language has a very good collection of built in functions and operators using them we can write any complex program.
- This language has features of both a high level language and assembly language so we can use it to write any kind of program (it may be system software or a business package).
- This language is fast and efficient due to presence of many data types and operators.
- This is a very extensible language that means it has a collection of many function but it also gives full freedom to user to add another function.
11 Basic Points to know about C Language
1. Header files and processed directives
As we know C language has a good collection of built in functions, so whenever we are using any built in function we need to mention in which header file it is present. For example we are printing something on screen and at that time we need to mention “stdio.h” file otherwise we will get an error.
2. Constants, variables and data types
In simple words, constant has a fixed value which never changes during the execution of program. Variable has a value which keeps on changing during execution of program. Data type simply tells us the type of data we are using (like if data is a number or an alphabet). There are many categories of data types. C Language allows int, char, float, double, long double as primary data type.
They are basically used to manipulate the data (manipulation may be logically or mathematically). The data on which operation is done is called operand. There are a number of operators used in C.
4. Control statements
They are used to control the flow of execution of program. They are also called decision making statements. “If statement” and “switch” are its examples.
The part of program which we need to execute a number of times is written inside a loop. There are three types of loops: for, while and do while.
It is a user defined data type. In array we store related data and array has a common name. Array can be of any data type.
String is also an array but it is used only for character value and it is always terminated by null character.
A function contains a code which performs a specific task. Whenever we need to do this task we use function.
It is similar to array but in this different data types can be represented which makes it more useful than array.
It is same as structure only the storing of data is different from structure.
It is a very important feature of C language. For storing the address of a variable we use pointer. In simple words, we can say it points the variable whose address is stored in it.
These are the basic things which you ought to know in C. Once these things are clear to you C will not be a tough language for you anymore.