Introduction to C++ Programming Language

Empower Edupower
3 min readMay 3, 2021

*Introduction :

A program is a sequence of institutions that can be executed by a computer.

Every program is written in some programming language. C++ is one of the most powerful programming language available.

To write and run C++ programs, you need to have a text editor, and a C++ compiler installed in your computer.

✓Text Editor

A text editor is a software system that allows you to create and edit text files on your computer. Programmers uses text editor to write a programming language such as C++.

✓Compiler

A Compiler is a software system that translates programs into the machine’s language, i.e., Binary Code, that the computer’s operating system can run them, that translation process is called the compiling the program.

✓Basic Steps to solve program on a computer

1.Read the program carefully, and decide what are inputs and outputs.

2.Write the instructions by using one of programming language like C++. This coded set of instructions is called Source Program. You need a text editor for this.

3.Save this file with extension .cpp on your computer.

4.Compile and run the program with test data.

5.After running the program, you get output.

✓Basic Terminology

1.First line is known as Comment. Declaration of the comment stat in C++ starts with the symbol //. Any statements within comments are not executable, they are ignored by the compiler.

2.In the Second line, #include is a preprocessor direction. It is not a part of our program, it is an instructions to the compiler to include the contents of the files ‘iostream.h’. input and output stream (iostream.h) contains a set of functions for handling input and output operations in C++ . Normally we use ‘cin’ for input and ‘cout’ for output.

3. Third line ‘void main()’ is also required in every C++ program. It tells where the program begins.

4.Next one line is the actual body of the program. A program body is a sequence of statements enclosed in brackets { }.

The C++ language is case-sensitive. main() is different from Main().

✓Sample Program

✓Some shortcuts

1.Alt+Enter Key:

To make big screen or small screen as per requirement.

If curser struck then to select Menus.

It gives you a black screen.

To get immediate output

To clear the output screen. Need to add #include<conio.h> in program.

This is all for today.

In detail, We will see in the next post.

Stay safe, Stay healthy.

Originally published at https://empoweredupower.blogspot.com.

--

--

Empower Edupower
0 Followers

Hello! Welcome to Empower Edupower. Here we are publishing interesting posts about lifestyle, culture, education and many more.