You are on page 1of 3

Date : 2077 -Bhadra-2

LAB REPORT NO. :- 1


AIM OF LAB
To write a simple program using formatted Output .

Program
#include<stdio.h> //header files
#include<conio.h>
void main() //main function(beginning of program)
{
clrscr();
printf (“Hello World!”); //output statement
getch();
}

Explanation
 This program is based on the formatted output. It is just explaining
the basic syntax of C-programming.The first two lines of program
contain preprocessor commands which instructs compiler to include
contents of header files into the program from library. The third sta-
-tement (main function) is the beginning of execution of program.
Inside curly bracket ,we have clear screen function (clrscr) to clear
the previous output.Then we have (printf )function to display the
output string ‘Hello World!’.At last,we have getch function to hold
the screen until user press any key from keyboard.
Conclusion
 After this lab, we can write simple programs using formatted output.
We have understood the basic syntax of C-Pro.Language.
1
2
3

You might also like