CBSE Class 11 Computer Science Programming In C++ Notes

Download CBSE Class 11 Computer Science Programming In C++ Notes in PDF format. All Revision notes for Class 11 Computer Science have been designed as per the latest syllabus and updated chapters given in your textbook for Computer Science in Class 11. Our teachers have designed these concept notes for the benefit of Class 11 students. You should use these chapter wise notes for revision on daily basis. These study notes can also be used for learning each chapter and its important and difficult topics or revision just before your exams to help you get better scores in upcoming examinations, You can also use Printable notes for Class 11 Computer Science for faster revision of difficult topics and get higher rank. After reading these notes also refer to MCQ questions for Class 11 Computer Science given on studiestoday

Revision Notes for Class 11 Computer Science Programming In C++

Class 11 Computer Science students should refer to the following concepts and notes for Programming In C++ in Class 11. These exam notes for Class 11 Computer Science will be very useful for upcoming class tests and examinations and help you to score good marks

Programming In C++ Notes Class 11 Computer Science

Programming in C++

Investigation of Programming Construct in C++.

OBJECTIVES :

• 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

#include<iostream.h>

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.

class_11_Computer_science_concept_3

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 :

class_11_Computer_science_concept_4

 

So easy isn't it ? As you observe that the arrows are moving in one direction only from top to bottom ,the flow of program is sequential / linear.

 

Work out yourself :

 

Identify few of the programs which you have written while dealing Unit-3 and find whether they are following sequential flow of program? If yes can you make a flow chart to justify your idea.

 

So there exist a big question now that whether C++ programs have other types of flow of program which is totally different from linear flow. Yes , students we also have other types of flow of program.

 

Conditional Flow

 

Let us investigate the real life problems visited by us earlier in this chapter :

 

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

 

We will represent the above problem in flow chart notation :

Programming in C++ 1

 

Program – 1.2

 

// program to implement the problem described by flowchart-2

 

#include<iostream.h>

 

void main( )

 

{

 

int num = 0 ; // declaring a variable num

 

cout<<‖Input the number you want to check‖ ;

 

cin>>num; // Inputting value of n

 

if ( n % 3 == 0 ) // checking whether n is divisible by 3 , consider the first rhombus of

 

{ the flowchart-2

 

if (n% 5 == 0 ) // checking whether n is divisible by 5 , consider the second rhombus

 

{ // of flowchart-2

 

cout<<‖The number you inputted is divisible by both 3 and 5‖ ; // path1

 

}

 

else

 

cout<<‖The number you inputted is not divisible both by 3 and 5‖; // path2

 

}

 

else

 

cout<<‖The number you inputted is not divisible both by 3 and 5‖; // path2

 

}

 

The shaded part of the above program shows how a conditional branching is implemented with an if ( )- else construct of C++.
 
Workout yourself :

Draw flowcharts for problem situation b) given earlier in page no. 4, and then find whether the problem follows a linear flow or conditional flow ? Check it out with you teacher.
 
1.1.3 : Iterative Flow / Cyclic Flow :
 
Now let us solve the problem situation c) given in page 4 with the help of a flowchart . i.e
A teacher wants to calculate the average marks for each of his 40 pupils in a class.
Let us assume that the teacher maintains count of his/her students in a variable say n.
Let the teacher starts n from 1st student i.e n = 1
Let there are marks in five subjects say s1 , s2 , s3 , s4 and s5 and Avg as Average
We must remember that this problem demands calculation of average marks of each student, i.e
Average marks for each of the individual 40 students would be calculated and displayed.
Programming in C++ 2


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

CBSE Class 11 Computer Science Programming In C++ Notes

We hope you liked the above notes for topic Programming In C++ which has been designed as per the latest syllabus for Class 11 Computer Science released by CBSE. Students of Class 11 should download and practice the above notes for Class 11 Computer Science regularly. All revision notes have been designed for Computer Science by referring to the most important topics which the students should learn to get better marks in examinations. Studiestoday is the best website for Class 11 students to download all latest study material.

Notes for Computer Science CBSE Class 11 Programming In C++

Our team of expert teachers have referred to the NCERT book for Class 11 Computer Science to design the Computer Science Class 11 notes. If you read the concepts and revision notes for one chapter daily, students will get higher marks in Class 11 exams this year. Daily revision of Computer Science course notes and related study material will help you to have a better understanding of all concepts and also clear all your doubts. You can download all Revision notes for Class 11 Computer Science also from www.studiestoday.com absolutely free of cost in Pdf format. After reading the notes which have been developed as per the latest books also refer to the NCERT solutions for Class 11 Computer Science provided by our teachers

Programming In C++ Notes for Computer Science CBSE Class 11

All revision class notes given above for Class 11 Computer Science have been developed as per the latest curriculum and books issued for the current academic year. The students of Class 11 can rest assured that the best teachers have designed the notes of Computer Science so that you are able to revise the entire syllabus if you download and read them carefully. We have also provided a lot of MCQ questions for Class 11 Computer Science in the notes so that you can learn the concepts and also solve questions relating to the topics. All study material for Class 11 Computer Science students have been given on studiestoday.

Programming In C++ CBSE Class 11 Computer Science Notes

Regular notes reading helps to build a more comprehensive understanding of Programming In C++ concepts. notes play a crucial role in understanding Programming In C++ in CBSE Class 11. Students can download all the notes, worksheets, assignments, and practice papers of the same chapter in Class 11 Computer Science in Pdf format. You can print them or read them online on your computer or mobile.

Notes for CBSE Computer Science Class 11 Programming In C++

CBSE Class 11 Computer Science latest books have been used for writing the above notes. If you have exams then you should revise all concepts relating to Programming In C++ by taking out a print and keeping them with you. We have also provided a lot of Worksheets for Class 11 Computer Science which you can use to further make yourself stronger in Computer Science

Where can I download latest CBSE Class 11 Computer Science Programming In C++ notes

You can download notes for Class 11 Computer Science Programming In C++ for latest academic session from StudiesToday.com

Can I download the Notes for Programming In C++ Class 11 Computer Science in Pdf format

Yes, you can click on the link above and download notes PDFs for Class 11 Computer Science Programming In C++ which you can use for daily revision

Are the revision notes available for Programming In C++ Class 11 Computer Science for the latest CBSE academic session

Yes, the notes issued for Class 11 Computer Science Programming In C++ have been made available here for latest CBSE session

How can I download the Programming In C++ Class 11 Computer Science Notes pdf

You can easily access the link above and download the Class 11 Notes for Computer Science Programming In C++ for each topic in Pdf

Is there any charge for the Class 11 Computer Science Programming In C++ notes

There is no charge for the notes for CBSE Class 11 Computer Science Programming In C++, you can download everything free of charge

Which is the best online platform to find notes for Programming In C++ Class 11 Computer Science

www.studiestoday.com is the best website from which you can download latest notes for Programming In C++ Computer Science Class 11

Where can I find topic-wise notes for Class 11 Computer Science Programming In C++

Come to StudiesToday.com to get best quality topic wise notes for Class 11 Computer Science Programming In C++

Can I get latest Programming In C++ Class 11 Computer Science revision notes as per CBSE syllabus

We have provided all notes for each topic of Class 11 Computer Science Programming In C++ as per latest CBSE syllabus