C language
C is a procedural programming language. It was initially developed by Dennis Ritchie and Ken Thompson in the year 1972 at AT and T bell lab of USA . It was mainly developed as a system programming language to write an operating system. The main features of C language include low-level access to memory, a simple set of keywords, and clean style, these features make C language suitable for system programmings like an operating system or compiler development. It is mainly used to convert high level code into low level language code and vice versa.
High level language code includes......... A,B,C......
0,1,2,3......
&,-,+,*.......
Low level language code includes........ 0 & 1
(0--off/false/low)
(1--on/true/high)
Basic rules for C programming language
- Includes all required header files.
- Includes main function.
- Includes required variables.
- Includes all required statements.
- Closes the main Function.
![]() |
| Example of C program |
This is very basic program which has one header file and main function only. When we press ctrl + F9 , this does not run because it has only one basic header file. To run our program we will learn further.
- Header File
It is predefined program which contains ready made functions.
- Function
It is the smallest individual sub program which performs specific task.
- Main Function
It is a special function which is developed by user and invoked by a C compiler . It is also known as start point of C program.
- printf
It is use to print messages as well as variables values .
SYNTAX
printf("message");
ex. printf("Hello..");
printf("conversion specifier",variable);
ex. printf("%d",a);
- clrscr()
It is use to clear the output screen at the run time .Its header file name is conio.h(console input output header file).
- getch()
It is use to input a character through keyboard at the run time but it is not visible.
example...Program to print hello using all these which we have discussed above.

Example in C to print hello
for compilation press...alt+F9
to run the program press....ctrl+F9
Output ↓
- Main Function
It is a special function which is developed by user and invoked by a C compiler . It is also known as start point of C program.
- printf
It is use to print messages as well as variables values .
SYNTAX
printf("message");
ex. printf("Hello..");
printf("conversion specifier",variable);
ex. printf("%d",a);
- clrscr()
It is use to clear the output screen at the run time .Its header file name is conio.h(console input output header file).
- getch()
It is use to input a character through keyboard at the run time but it is not visible.
example...Program to print hello using all these which we have discussed above.
![]() |
| Example in C to print hello |
for compilation press...alt+F9
to run the program press....ctrl+F9
Output ↓


Comments
Post a Comment