C Programming Language
Introduction and features of C Programming Language
C sis programming language developed at AT & T’s Bell Laboratories of the USA in the 1970’s. it was designed and developed by Dennis M. Ritchie. C seems so popular because it is reliable, simple and easy to use. C stands in between high-level language and low-level language. That is why it is often called a Middle-Level Language. It is designed to have both: relatively good programming efficiency (as compared to machine-oriented languages) and relatively good machine efficiency.
Features of C Programming Language
We briefly list some of C’s characteristics that define the languages and also have lead to its popularity as a programming language. We will be studying many of these aspects throughout the course. Some of the features of C programming language are:
- Portability: one of the reasons of C’s popularity is its portability. We can easily transform a program written in C from one computer to another with few or no changes and compile with an appropriate compiler.
- Faster and efficient: C is desirable because it is faster and more efficient than the comparable program in most other high-level-languages. For e.g. a program to increment a variable from 0 to 15000 takes about 50 second in BASIC while it takes 1 second in C.
- Supports structured programming: it is well suited for structured programming that means the problem might be solved in terms of function modules or blocks. The modular structure makes the program debugging, testing and maintenance easier.
- Extensibility: Another property of C is extensibility. C is basically a collection of functions that are supported by the C library. We can continuously add (or extend) our own functions to C.
- Flexible: C is a flexible language. It permits us to write any complex programs with the help of its rich set of in-built functions and operators. In addition, it permits the use of low-level language. Hence, it is also called middle-level language and therefore it is well suited for both system and application software development.
Advantage of C Programming Languages:
- It is more efficient than unstructured code because of the minimized branching of the code
- Correction of errors (debugging) in a program is easy.
- Adding a new feature is easier and faster.
- Maintenance the C code is easy due to the readability of the code
- It is easy to interact with hardware
- It is easy to learn
- The program code is secured
- It is compact efficient to use.
Disadvantage of C Programming Languages:
- The program takes more time to design and implement the software.
- C coding techniques sometimes result in repeating code in a program
- C coding becomes less efficient if the sub-routines called frequently thereby killing the time.
- C does not have efficient garbage collection
- It doesn’t contain runtime checking
- There is no strict type checking (for example, we can pass an integer value for floating data type).
- As the program extends, it is very difficult to fix the bugs.
Structure of C Programming Languages
A program is a sequence of instructions. Instruction of a C program is written as a statement.
A statement is terminated by a semicolon (;). One or more statement form a block (compound) statement enclosed within a pair of Braces, i.e { }.
All executable statements must be inside a function. A function is a collection of statement which performs some specific task.
Every C program consists of one or more functions and every C program must contain a special function named main ().
The statements with this function are the first ones to be executed.
A comments is written with the delimiters /* and */
Comment example: /* this is a comment text */
Simple Program in C to display Hello World
#include<stdio.h> /* I/O header File*/
void main() /* main function heading */
{
printf("Hello World"); /* call to printf */
printf("Welcome to C Programming \n");
}
Output:

Class 11 computer Science Notes Chapter One Check Here