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

5 Life Lessons from Uramichi Oniisan That Hit Harder as an Adult

If you've ever found yourself laughing at an anime scene only to feel weirdly seen afterward, Uramichi Oniisan probably left a mark on you too. This anime isn’t just another slice-of-life comedy, it’s a painfully honest portrayal of adulthood wrapped in bright colors and forced smiles. At first glance, it looks like a quirky kids' show with eccentric adult hosts. But under the surface, it’s a mirror, one that reflects the quiet struggles, emotional burnout, and the mental load many of us carry every day.  In this post, we’ll break down 5 powerful life lessons from Uramichi Oniisan - lessons that don’t just entertain, but truly resonate with anyone navigating the messy, complicated world of adulthood. Uramichi’s smile hides the emotional weight of adulthood — a reality many adults face daily. 1. Smiling Doesn’t Mean You’re Happy In Uramichi Oniisan, the main character, Uramichi Omota, is always smiling on-screen. As the host of a children’s TV show, his face beams with energy, h...

Courage, in My Quiet Moments

There’s a quote I keep coming back to, especially lately, by Mary Anne Radmacher: “Courage doesn’t always roar. Sometimes courage is the quiet voice at the end of the day saying, ‘I will try again tomorrow.’” To be honest, I haven’t been in a place where I feel strong or fearless. Most days, I’m just moving through my responsibilities-doing a job I didn’t choose out of passion, but out of necessity. And some days, it feels like the weight of everything is too much. The dreams I had for myself feel paused or distant, and preparing for something better feels hard when I’m already stretched thin. But then there’s that small voice inside me - the one that shows up quietly when the day ends. It doesn’t roar. It doesn’t promise miracles. It just says, “Try again tomorrow.” That’s the courage I’m learning to hold onto. Not the loud, dramatic kind, but the steady, tired kind - the one that keeps showing up, even when nothing feels certain. So if you’re also in a place where you're just try...

Work-Life Balance: Practical Tips to Manage Career and Personal Life

In today’s constantly connected world, finding true balance between work and personal life feels harder than ever. Long working hours, digital distractions, and growing responsibilities often blur the line between professional duties and personal well-being. This is where work-life balance becomes not a luxury, but a necessity. Work-life balance is about creating harmony between your career and your personal life so that neither overwhelms the other. When done right, it improves mental health, productivity, relationships, and overall happiness. I used to check emails late into the night, but learning to disconnect completely changed my energy levels and focus. What Is Work-Life Balance? Work-life balance means managing your time and energy in a way that allows you to meet work responsibilities while still having space for rest, family, hobbies, and self-care. It does not mean working less. It means working smarter, with boundaries and intention. Why Work-Life Balance Is Important Witho...
હું તણખલા ના સહારે તરી ને આવ્યો છું, આ જહાજો ના કાફલા તો મને કિનારે આવી ને મળ્યા છે!

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