Skip to main content

Introduction to C++ Programming Language

 













•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.

2. F10 key:

        If curser struck then to select Menus.

3. Alt+X key:

        It gives you a black screen.

4. Cin.get();  :

       To get immediate output

5. Clrscr();    :

         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.
Bye for now.
Stay safe, Stay healthy.

Visit Instagram and follow us Instagram
Thank You.

Comments

Popular posts from this blog

Radhaashtami: The Divine Celebration of Devotion and Love

As the soft breeze whispers through the trees and the festive air fills with devotion, Radhaashtami, the birth anniversary of Sri Radha Rani, the eternal consort of Lord Sri Krishn, is celebrated with great enthusiasm and love. Falling on the eighth day (Ashtami) of the Shukla Paksha in the Bhadrapada month, this festival marks an important occasion in Hinduism. Radhaashtami is a day dedicated to the embodiment of love, devotion, and grace—Sri Radha. Sri Radha's bond with Sri Krishn transcends the physical world, symbolizing the ultimate union of the soul with the divine. The Significance of Radhaashtami In Hinduism, Sri Radha is revered as the eternal love and supreme devotee of Lord SrinKrishn. Though Sri Krishn is known to be the embodiment of all divine virtues, it is said that even he seeks to experience the love that Sri Radha possesses for him. She is the personification of pure devotion (bhakti) and selfless love (prem), making her an inspiration for devotees across the wor...

Metaverse: The Future of the Internet

Hello friends, Today we are exploring the most interesting topic, The Metaverse So first of all let's understand what the Metaverse is It is a hypothesized iteration of the internet as a single, universal and immersive virtual world that is facilitated by the use of virtual reality (VR) and augmented reality (AR) headsets. In colloquial usage, a "metaverse" is a network of 3D virtual worlds focused on social and economic connection.  Some software platforms require a virtual reality headset to explore the metaverse. The term "metaverse" originated in the 1992 science fiction novel Snow Crash as a portmanteau of "meta" and "universe". The metaverse is still in its early stages of development, but it has the potential to revolutionize the way we interact with the internet and with each other.  It could be used for a variety of purposes, such as: Work : The metaverse could be used to create a more immersive and collaborative work environment. Em...

Ghost with Angle's Heart

         Far far away from the city, in distant dark dense forest; there lived a little boy, all alone, by himself. This lonely creature wanted to go to the city, make friends and play like any normal earthlings. But his scary face was his prison.          One day a beautiful girl find her way to lonely creature's home. When he saw her, he hide inside the room. She entered the room in which boy was hiding. After looking at his scary, ugly face girl said..... " Let's be friends!!!" " Aren't you scared of my ugly ghost like face???" ... He asked. "It's pretty!!!" ... Girl replied. Boy was totally amazed. " Your heart!!... It's pretty , though".... Girl added. They became friends and played all day long in the forest. At evening it was then time for departure. Boy with watery Eyes , said... " You are like a fairytale to me!!! " " Then let's meet again, dear friend".... She whispered in his ears. Making a p...