0% found this document useful (0 votes)
68 views3 pages

Lab Report No.:-1

This lab report summarizes a simple C program that uses formatted output to print "Hello World!". The program includes header files, defines the main function, clears the screen, prints the message using printf, and waits for keyboard input using getch. The explanation section describes the purpose and functionality of each part of the program. The conclusion is that this lab taught the basics of writing C programs using formatted output.

Uploaded by

Basant Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views3 pages

Lab Report No.:-1

This lab report summarizes a simple C program that uses formatted output to print "Hello World!". The program includes header files, defines the main function, clears the screen, prints the message using printf, and waits for keyboard input using getch. The explanation section describes the purpose and functionality of each part of the program. The conclusion is that this lab taught the basics of writing C programs using formatted output.

Uploaded by

Basant Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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