The most basic program for C language. Thats what this is.
This is a simple C language “Hello World” program.
The Program:
|
1 2 3 4 5 6 7 8 |
#include<stdio.h>//Header files #include<conio.h> void main() //Our main function { printf("Hello"); //Our print statement getch(); //Means get character } |
getch(): getch() stands for ‘get charater’. It tells the compiler to wait for the user to press a button before closing the window.
Note: This program might run the same without ‘#include<conio.h>’ and ‘getch()’ in Visual C++/Studio but might give an error in other compilers. So, try it for yourself.
Enjoy ![]()
Tested in Visual C++ Express/Visual Studio
Lalit Mali
Lalit is a technology enthusiast, a programming lover and currently an Android fan.
Latest posts by Lalit Mali (see all)
- Rank Pages in a Directory by Occurrence of a Particular Word in them – Java Data Mining - October 16, 2012
- Java Data Mining: Number of occurrences of a word in a file - October 15, 2012
- Calculate factorial of a number using C++ Recursive function - October 14, 2012