Lecture 2
Lecture 2
02
C Language
LECTURE 2
04
Today’s Agenda
01
Writing The First “C” Program
02
What are Header Files ?
03
What is “stdio.h” and why do we use it ?
04
What is “conio.h” and why do we use it ?
Writing The First “C” Program
void main()
{
clrscr();
printf(“Hello User”);
}
What are Header Files ?
1. Header file are those files which have the extension .h in C/C++ languages.
2. These header files are created by the company which design the IDE of
C language, in our case it is BORLAND.
What are Header Files ?
3. These header files contain a huge collection of predefined programs which are
called as FUNCTION.
4. For Example: All the mathematical functions like sqrt(), pow(), sim(). Con(), tan(),
log() etc are available in a header file called math.h.
What are Header Files ?
5. Similarly all the functions for drawing various figure on screen are available in a
header file called graphics.h like circle(), rectangle(), polygon(), ellipse(), bar() etc
2. In programming the word std input refers to keyboard and the word
std output refer to monitor (screen).
What is “stdio.h” and why do we use it ?
3. Thus the word stdio.h stands for standard input output, h and this header file
provides we to very important activities.
4. These activities are input (accepting data from the user) and output (displaying
result on the screen).
What is “stdio.h” and why do we use it ?
5. For input we get a function called as scanf() and for output we get a function
called printf().
6. Since almost every program performs input and output activities so the header
file stdio.h is also used by almost every C program.
What is “conio.h” and why do we use it ?
The term conio stands for console input output and in programming the
word console means OUTPUT window i.e. the window where the result of
execution of out program is displayed.
What is “conio.h” and why do we use it ?
Although the header file conio.h does not generate the CONSOLE window
for us, because CONSOLE is automatically provide by the OS.
However, the file conio.h provids us some very useful function which will
help us control/manage the console window. These most
popular functions are:
What is “conio.h” and why do we use it ?
Thank you