Skip to main content

Welcome to Coding 4 Programming

Addition of Two Binary Numbers | Function | Python

First Program | C++

First Program (Basic) of C++


#include<iostream.h>
#include<conio.h>
void main()
{
 clrscr();
 cout<<"\n\t Welcome to Coding 4 Programming";
 cout<<"\n\n\t This is my First Program.";
 getch();
}


Compiler Screen:


First Program
Compiler Screen

Output Screen:


First Program
Output Screen


Illustration:

1. In Header Files (line 1 and line 2) .h is not required in some compilers.

2. iostream.h (line 1) header file is used for input (cin) and output (cout) services.

3. conio.h (line 2) header file is used for clrscr() and getch() functions.

4. Instead of void main (line 3) some may use int main.

5. Some new compiler required using namespace std; before main function (line 3).

6. clrscr() (line 5) function is used for clear the previous output on output screen.

7. \n is used for new or next line.

8. \t is used for giving tap space.

9. cout (line 6 and line 7) is used for the display anything (content) on output screen.

10. getch() (line 8) function is used for freezing the output screen.

11. Paranthesis i.e., {} (line 4 and line 9) is used for the block. That means from line 4 to line 9 is single block

Comments

Popular Posts