CBSE Class 11 Computer Science Programming In C++ Notes

CBSE Class XI Computer Science Programming in C++ Concepts. Learning the important concepts is very important for every student to get better marks in examinations. The concepts should be clear which will help in faster learning. The attached concepts made as per NCERT and CBSE pattern will help the student to understand the chapter and score better marks in the examinations.

Programming in C++

Investigation of Programming Construct in C++.


• to emphasize the programming construct available in C++

 to investigate each and every programming construct emphasizing the situation where they can be used perfectly.

 to demonstrate few working program in C++ using the constructs.

1.1 Why and What of Constructs in C++ programming

1.1.1 : Flow of logic

You have seen in the previous unit that a program is implementation of an algorithm (steps involved in problem solving) using a particular programming language like C , C++ , Java etc. In our case we are using C++ as a high level language (HLL) to code our programs.

A programming language like C++ is having a bundle of programming elements like tokens , identifiers , variables , constants , operator symbols , punctuation symbols etc. (please refer to earlier unit if you have not learnt all these terms.) . All these programming elements helps a programmer to write simple C++ programs as shown below :

program 1.1

// a simple program in C++ to add two integers


void main( )


int a = 0 , b = 0 ;

cout<<”Input two numbers”;

cin>> a>>b;

cout<<”The sum of numbers are: ” << (a+b);


The above program is a very basic program which asks two integer values from user and prints out their sum. In the above program you may observe that various programming elements like:

                         # < ( ) { = , a b << >> int void main ―Input two numbers ― ; are being used.


Students the program above is very simple to be thought , written and executed, but in real industrial programming situation we seldom get such programs to write. There are many complex situation in life where we often need to write programs using few advanced programming elements. Let us investigate few of the real life situations :

a) Ram needs to find out whether any number is divisible by both 3 and 5.

b) A shopkeeper wants to give x % discount on a particular purchase only when the net purchase by his customer exceeds Rs. 1000

c) A teacher wants to calculate the average marks for each of his 40 pupils in a class.

d) Suresh wants to continue his program till he is pressing escape button on keyboard.

Can you program the above programming problems using the programming elements of C++ which you have learn till now ?

Your answer would be probably a NO , because the C++ programming elements which you have studied till now , will only enable you to write simple linear programs , or sequential programs.

1.1.2: Linear Flow

A simple linear program is one which has a linear flow of execution of programming logic /statements. e.g. program 1.1. The logic of program flows ( or better they are termed as control flow) from top to bottom out of set of statements.

Now let us proof the that program 1.1 follows a sequential flow of logic by the following flow chart diagram :


Please click the link below to download pdf file for CBSE Class XI Computer Science Programming in C++ Concepts.



Click to View or Download pdf file
Click for more Computer Science Study Material

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

CBSE Boards Paper Checking to Start

As per the announcement recently released by the Ministry of Home Affairs, at least 3000 CBSE affiliated selected as evaluation centers for board exam answer sheets will be allowed to open for the limited purpose of evaluation purposes only. The answer sheets for Board...

CBSE Board Results for Class 10 and Class 12

Anticipated CBSE result 2020 Date and Time: This is all you wish to know! Here is the news which all students are waiting for. The expected date and time for the CBSE Class X and XII Results 2020 can be viewed here by the students. CBSE Result 2020: The Central Board...

CBSE Boards Answer Sheet Evaluation Class 10 and Class 12

HRD Minister Ramesh Pokhriyal, through a video conference with all the education ministers of the state, discussed the further steps to be taken to smoothen the education process during the Covid-19 lockdown. The most important topic which was discussed repeatedly on...

Board Exams FAQs released by CBSE

CBSE has released very important FAQs for class 10 and class 12 students who have given the board exams. Students have been coming up with lot of queries and have lot of questions relating to what are the next steps of CBSE. The following FAQs by CBSE will help to...

Art Integrated Project work for classes 1 to 10

CBSE Board has decided to introduce Art-Integrated Project work for classes I to X to promote Art-Integrated Learning in schools to make teaching learning Competency-Based and joyful. As part of this, at least one Art-Integrated Project in each subject shall be taken...

Important announcement regarding rescheduling of Class 10 and 12 Board Exams

CBSE Board Exams 2020: Here's when Board will organize the CBSE Class X and Class XII Board Exams. All the candidates appearing for CBSE Standard X and Standard XII Board Exams 2020 can cross check the essential notice released by the board concerning rearrangement of...

Studies Today