0% found this document useful (0 votes)
46 views

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, uses printf to display the message, and gets character input using getch. The explanation section describes the code, noting it demonstrates basic C syntax. The conclusion is that this lab taught how to write programs with formatted output and the basic structure of C programs.

Uploaded by

Basant Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

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, uses printf to display the message, and gets character input using getch. The explanation section describes the code, noting it demonstrates basic C syntax. The conclusion is that this lab taught how to write programs with formatted output and the basic structure of C programs.

Uploaded by

Basant Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, 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.
PAGE:1…….
PAGE:2…….
PAGE:3…….

You might also like