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

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

100 Years Before Ghibli-Style Al

Studio Ghibli Vibes 100 Years Before Ghibli-Style Al, This Japanese Artist's Exquisite Woodblock Prints Captured India's Striking Beauty Al-generated Ghibli-style images are everywhere: soft colours, dreamy details, pure nostalgia. But long before Al or even Ghibli, one man captured that magic by hand. Hiroshi Yoshida, a Japanese woodblock master, wasn't just an artist, he was an adventurer. To paint landscapes, he travelled the world himself. In 1930, he set his sights on India. Japan and India's cultural ties were growing, and Yoshida was drawn to India's rich history and stunning landscapes. For four months, he captured the country like never before. He was part of the shin-hanga movement that blended traditional woodblock printing with modern techniques. Unlike older ukiyo-e prints, it used Western-style shading, creating depth and atmosphere. Most artists left the carving and printing to craftsmen. Not Yoshida. He controlled everything, from sketching to colour...

Celebrating Janmashtami: A Festival of Devotion and Joy

जय श्री कृष्ण  Janmashtami, the auspicious Hindu festival, marks the birth of Lord Krishna, the eighth avatar of Vishnu. Celebrated with great fervor and devotion across India and beyond, this festival is a blend of spirituality, culture, and community bonding. For those of us who find solace in traditions and seek inspiration in divine stories, Janmashtami offers a unique opportunity to immerse ourselves in the life and teachings of Krishna, whose wisdom and playful persona continue to inspire millions.  The Significance of Janmashtami Janmashtami falls on the eighth day (Ashtami) of the Krishna Paksha (dark fortnight) in the month of Savan, which typically occurs in August or September. This day is celebrated as Krishna’s birthday, the day when the Supreme God descended to earth in human form to restore Dharma (righteousness) and guide humanity on the path of truth and compassion. Krishna's life is a testament to the triumph of good over evil. From his miraculous escape from...

Be like an Eagle

  Did you know that an eagle can foresee when a storm is approaching long before it breaks? Instead of hiding, the eagle will fly to some high point and wait for the winds to come. When the storm hits, it sets its wings so that the wind can pick it up and lift it above the storm. While the storm rages below, the eagle soars above it. The eagle doesn't escape or hide from the storm instead it uses the storm to lift it higher. It rises on the stormy winds which others dread. When the storm of life or challenges hit us, we can rise above them and soar like the eagle which ride the winds of the storm. Don’t be afraid of the storms or the challenges in your life. Use it to lift you higher in your life. This is a small story but gives a Big message. May this help you in empowering your life.