Download the latest CBSE Class 12 Computer Science Introduction To C++ Notes in PDF format. These Class 12 Computer Science revision notes are carefully designed by expert teachers to align with the 2025-26 syllabus. These notes are great daily learning and last minute exam preparation and they simplify complex topics and highlight important definitions for Class 12 students.
Chapter-wise Revision Notes for Class 12 Computer Science Introduction To C++
To secure a higher rank, students should use these Class 12 Computer Science Introduction To C++ notes for quick learning of important concepts. These exam-oriented summaries focus on difficult topics and high-weightage sections helpful in school tests and final examinations.
Introduction To C++ Revision Notes for Class 12 Computer Science
Structure-Collection of logically related different data types (Primitive and Derived) referenced under one name.
Nested structure
• A Structure definition within another structure.
• A structure containing object of another structure.
typedef
• Used to define new data type name
#define Directives
• Use to define a constant number or macro or to replace an instruction.
Inline Function
• Inline functions are functions where the call is made to inline functions, the actual code then gets placed in the calling program.
• What happens when an inline function is written?
• The inline function takes the format as a normal function but when it is compiled it is compiled as inline code. The function is placed separately as inline function, thus adding readability to the source program. When the program is compiled, the code present in function body is replaced in the place of function call.
General Format of inline Function:
The general format of inline function is as follows:
inline datatype function_name(arguments)
inline int MyClass( )
Example:
#include <iostream.h>
int MyClass(int);
void main( )
{int x;
cout << “\n Enter the Input Value: ”;
cin>>x;
cout<<”\n The Output is: “ << MyClass(
} inline int MyClass(int x1)
{return 5*x1;}
The output of the above program is:
Enter the Input Value: 10
The Output is: 50
The output would be the same even when the inline function is written solely as a function. The concept, however, is different. When the program is compiled, the code present in the inline function MyClass ( ) is replaced in the place of function call in the calling program. The concept of inline function is used in this example because the function is a small line of code.
The above example, when compiled, would have the structure as follows:
#include <iostream.h>
int MyClass(int);
void main( )
{int x;
cout << “\n Enter the Input Value: ”; cin>>x;
//The MyClass(x) gets replaced with code return 5*x1;
cout<<”\n The Output is: “ << MyClass(x);
}
#include <iostream.h>
int MyClass(int);
void main( )
{int x;
cout << “\n Enter the Input Value: ”;
cin>>x;
//Call is made to the function MyClass
cout<<”\n The Output is: “ << MyClass(x);
}
int MyClass(int x1)
{return 5*x1;}
1 Marks questions
1) Name the header files that shall be needed for the following code:
void main( )
{ char word[]=”Board Exam”;
cout<<setw(20)<<word;
}
2) Name the Header file to which the following built in functions belongs to:
(i) gets() (ii) abs() (iii) sqrt() (iv) open()
2 Marks questions:
1) Rewrite the following program after removing the syntactical error(s) if any. Underline each correction.
#include<iostream.h>
void main( )
{ F = 10, S = 20;
test(F;S);
test(S);
}
void test(int x, int y = 20)
{ x=x+y;
count<<x>>y;
}
2) Find the output of the following program:
#include<iostream.h>
void main( )
{ int U=10,V=20;
for(int I=1;I<=2;I++)
{ cout<<”[1]”<<U++<<”&”<<V 5 <<endl;
cout<<”[2]”<<++V<<”&”<<U + 2 <<endl; } }
3) Rewrite the following C++ program after removing the syntax error(s) if any. Underline each correction. [CBSE 2010]
include<iostream.h>
class FLIGHT
{ Long FlightCode;
Char Description[25];
public
void addInfo()
{ cin>>FlightCode; gets(Description);}
void showInfo()
{ cout<<FlightCode<<”:”<<Description<<endl;}
};
void main( )
{ FLIGHT F;
addInfo.F();
showInfo.F;
}
4) In the following program, find the correct possible output(s)from the options:
#include<stdlib.h>
#include<iostream.h>
void main( )
{ randomize( );
char City[ ][10]={“DEL”, “CHN”, “KOL”, “BOM”, “BNG”};
int Fly;
for(int I=0; I<3;I++)
{Fly=random(2) + 1;
cout<<City[Fly]<< “:”;
}}
Outputs:
(i) DEL : CHN : KOL: (ii) CHN: KOL : CHN:
(iii) KOL : BOM : BNG: (iv) KOL : CHN : KOL:
5) In the following C++ program what is the expected value of Myscore from options (i) to (iv) given below. Justify your answer.
#include<stdlib.h>
#include<iostream.h>
void main( )
{ randomize( );
int Score[ ] = {25,20,34,56,72,63},Myscore;
cout<<Myscore<<endl;
}I
i) 25 (ii) 34 (iii) 20 (iv) Garbage Value.
Answer to Questions
1 Marks Answer
1) Ans: iostream.h
iomanip.h
2) Ans: iostream.h (ii) math.h,stdlib.h (iii) math.h (iv)fstream.h
2 marks Answers
1 Ans:
#include<iostream.h>
void test(int x,int y=20); //Prototype missing
void main( )
{ int F = 10, S = 20; //Data type missing
Text(F,S); //Comma to come instead of ;
Text(S);
void Text(int x, int y)
{ x=x+y;
cout<<x<<y; //Output operator << required }
2 Ans:Output:
[1]10&15
[2]21&13
[1]11&16
[2]22&14
3 Ans: #include<iostream.h>
class FLIGHT
{ long FlightCode;
char Description[25];
public:
void addInfo()
{ cin>>FlightCode; gets(Description);}
void showInfo()
{ cout<<FlightCode<<”:”<<Description<<endl;}
};
void main( )
{ FLIGHT F;
F.addInfo();
F.showInfo;
}
4 Ans)
Since random(2) gives either 0 or 1, Fly value will be either 1 or 2.
Please click the link below to download pdf file for CBSE Class 12 Computer Science - Introduction to C++.
| CBSE Class 12 Computer Science Boolean Algebra Notes Set A |
| CBSE Class 12 Computer Science Boolean Algebra Notes Set B |
| CBSE Class 12 Computer Science Boolean Algebra Notes Set C |
| CBSE Class 12 Computer Science Notes Of Cloud Computing And Open Standards Notes |
| CBSE Class 12 Computer Science Communication And Computer Networks Notes |
| CBSE Class 12 Computer Science Communication And Network Notes Set A |
| CBSE Class 12 Computer Science Communication And Network Notes Set B |
| CBSE Class 12 Computer Science Computer Networks Notes |
| CBSE Class 12 Computer Science Data File Handling In C++ Notes |
| CBSE Class 12 Computer Science Data Structure Notes Set A |
| CBSE Class 12 Computer Science Data Structure Notes Set B |
| CBSE Class 12 Computer Science Data Structure Notes Set C |
| CBSE Class 12 Computer Science Data Structures Notes |
| CBSE Class 12 Computer Science Data Visualization Using Pyplot Notes |
| CBSE Class 12 Computer Science Database And SQL Notes Set A |
| CBSE Class 12 Computer Science Database And SQL Notes Set B |
| CBSE Class 12 Computer Science File Handling Notes |
| CBSE Class 12 Computer Science Free And Open Source Software Notes |
| CBSE Class 12 Computer Science Functions In Python Notes |
| CBSE Class 12 Computer Science Idea of Efficiency Notes |
| CBSE Class 12 Computer Science Interface Python with an SQL database Notes |
| CBSE Class 12 Computer Science Introduction To C++ Notes |
| CBSE Class 12 Computer Science Revision of The Basics of Python Notes |
| CBSE Class 12 Computer Science Society Law and Ethics Notes |
| CBSE Class 12 Computer Science SQL Commands Aggregation Functions Notes |
| CBSE Class 12 Computer Science Using Python Libraries Notes |
Important Practice Resources for Class 12 Computer Science
CBSE Class 12 Computer Science Introduction To C++ Notes
Students can use these Revision Notes for Introduction To C++ to quickly understand all the main concepts. This study material has been prepared as per the latest CBSE syllabus for Class 12. Our teachers always suggest that Class 12 students read these notes regularly as they are focused on the most important topics that usually appear in school tests and final exams.
NCERT Based Introduction To C++ Summary
Our expert team has used the official NCERT book for Class 12 Computer Science to design these notes. These are the notes that definitely you for your current academic year. After reading the chapter summary, you should also refer to our NCERT solutions for Class 12. Always compare your understanding with our teacher prepared answers as they will help you build a very strong base in Computer Science.
Introduction To C++ Complete Revision and Practice
To prepare very well for y our exams, students should also solve the MCQ questions and practice worksheets provided on this page. These extra solved questions will help you to check if you have understood all the concepts of Introduction To C++. All study material on studiestoday.com is free and updated according to the latest Computer Science exam patterns. Using these revision notes daily will help you feel more confident and get better marks in your exams.
You can download the teacher prepared revision notes for CBSE Class 12 Computer Science Introduction To C++ Notes from StudiesToday.com. These notes are designed as per 2025-26 academic session to help Class 12 students get the best study material for Computer Science.
Yes, our CBSE Class 12 Computer Science Introduction To C++ Notes include 50% competency-based questions with focus on core logic, keyword definitions, and the practical application of Computer Science principles which is important for getting more marks in 2026 CBSE exams.
Yes, our CBSE Class 12 Computer Science Introduction To C++ Notes provide a detailed, topic wise breakdown of the chapter. Fundamental definitions, complex numerical formulas and all topics of CBSE syllabus in Class 12 is covered.
These notes for Computer Science are organized into bullet points and easy-to-read charts. By using CBSE Class 12 Computer Science Introduction To C++ Notes, Class 12 students fast revise formulas, key definitions before the exams.
No, all study resources on StudiesToday, including CBSE Class 12 Computer Science Introduction To C++ Notes, are available for immediate free download. Class 12 Computer Science study material is available in PDF and can be downloaded on mobile.