This Post Contains A C Program To Print Hello On Screen/Console With Correct Source Code & Output. This Program Is Written, Compiled & Executed At TurboC3.0 Compiler & Will Help You To Understand The Concept Of 'Printing Characters' From C Language. It Is A Well-Structured Program With Proper Comments Which Provides Step-By-Step Description Of Various Features Of The Language In A Simple & Easy-To-Understand Way.
C Program To Print Hello On Screen/Console.
/* Declaring Header Files */
#include <stdio.h>
#include <conio.h>
/* Start Of Main Program */
main()
{
/* Clearing The Screen */
clrscr();
printf ( " \n " );
printf ( " \t " );
/* Printing The Characters Onto Screen/Console */
printf ( " HELLO WORLD " );
getch();
return (0);
}
/* End Of Main Program */
Output:
HELLO WORLD.
Just Remember The Following Points In Order To Become A Good Programmer :
- Every Program Require & Has One & Only One 'main()' Function.
- Use Of More Than One 'main()' Is Illegal.
- Use Uniform Notation Throughout Your Code i.e. Hungarian Notation.
- Every Program [ Executable ] Statement Should End With A Semi-Colon.
- All Variables Must Be Declared With Thier Data Types Before They Are Used.
- Make Sure You Include Standard Header Files @ Start Of Program.
- When Braces Are Used To Group The Statements, Make Sure That The Opening Brace Has A Corresponding Closing Brace.
- A Comment Can Be Inserted Almost Anywhere A Space Can Appear. Use Of Appr. Comments In Proper Places Increases Readability & Understandability Of The Program & Helps User In Debugging & Testing.

No comments:
Post a Comment