Revision: Object Oriented Programming in C++ Computer Science (C++) Science (English Medium) Class 12 CBSE
- Observe the Following C++ Code Very Carefully and Rewrite It After Removing Any/All Syntactical Errors with Each Correction Underlined.
- Rewrite the Following C++ Code After Removing Any/All Syntactical Error with Each Correction Underline Note: Assume All Required Header Files Are Already Included in the Program.
- Study the Following Program and Select the Possible Output(S) from the Options (I) to (Iv) Following It. Also; Write the Maximum and the Minimum Values That, Can Be ·Assigned to the Variable Val
- Write the Type of C++ Tokens (Keywords and User-defined Identifiers) From the Following:
- Write the Output of the Following C++ Program Code: Note: Assume All Required Header Files Are Already Being Included in the Program. class Eval { char Level; int Point; public:
- Rewrite the Following C++ Code After Removing Any/All Syntactical Errors with Each Correction Underlined. Note: Assume All Required Header Files Are Already Being Included in the Program.
- Write the Output of the Following C++ Program Code : Note: Assume All Required Header Files Are Already Being Included in the Program. void Location(int &X,int Y=4) { Y+=2; X+=Y; }
- Write the Type of C++ Token (Keywords) and the User-defined Identifier from the Following.
- Find the Correct Identifiers Out of the Following, Which Can Be Used for Naming Variable, Constants Or Functions in a C++ Program.
- Give a Suitable Example in C++ to Illustrate with Its Definition Within a Class and a Declaration of an Object with the Help of It.
- Answer the Questions (I) to (Iv) Based on the Following:Which Type of Inheritance Out of the Following is Illustrated in the Above Example? Write the Names of All the Data Members, Which Are Directly Accessible from the Member Functions of Class Painting.
- Which Type of Inheritance Out of the Following is Illustrated in the Above Example? Single Level Inheritance, Multilevel Inheritance, Multiple Inheritance Write the Names of All the Member Functions, Which Are Directly Accessible by the Object T of Class Third as Declared in Main() Function Write Statement 2 to Call Function Display() of Class Second from the Object T of Class Third What Will Be the Order of Execution of the Constructors, When the Object T of Class Third is Declared Inside Main()?
- Which Type of Inheritance Out of the Following Is Illustrated in the Above Example and Write the Name of All the Member Which Are Directly Accessible by the Member Function View() of Class Schedule. and Write the Names of All the Members, Which Are Directly Accessible by the Object S of Class Schedule Declared in the Main() Function.
- Find and Write the Output of The. Following C++ Program Code Note : Assume Au· Required Header Files Are Already Included in the Program.
- Observe the Following C++ Code and Answer the Questions (I) and (Ii Which Object-oriented Programming Feature is Illustrated by the Member Function 1 and the Member Function 2 Together in the Class Test? Write Statement 1 and Statement 2 to Execute Member Function 1 and Member Function 2 Respectively.
- Write the Definition of a Member Function Pushgift() for a Class Stack in C++, to Add a Gift in a Dynamically Allocated Stack of Gifts Considering the Following Code is Already Written as a Part of the Program
- Observe the Following C++ Code and Answer the Questions (I) and (Ii):
- Find and Write the Output of the Following C++ Program Code: Note: Assume All Required Header Files Are Already Included in the Program
- Write the Definition of a Member Function Push( ) in C++, to Add a New Book in a Dynamic Stack of Books Considering the Following Code is Already Included in the Program
- Write the Definition of a Class Photo in C++ with the Following Description: Private Members Pno Category Exhibit I Public Members Register() Viewall()
- Observe the Following C++ Code and Answer the Questions (I) and (Ii). Note: Assume All Necessary Files Are Included. Which Objected Programming Features is Illustrated by the Definition of Classes First and Second? and Write Statement 1 and Statement 2 to Execute Member Function 1 and Member Function 2 Respectively Using the Object S
- Write the Definition of a Class Container in C++ with the Following Description. Private Members Public Members
- Look at the Following C++ Code and Find the Possible Output(S) from the Options (I) to (Iv) Following It. Also, Write the Maximum Values that Can Be Assigned to Each of the Variables N and M
- Write the Definition of a Class Box 1n C++ with the Following Description Private Members Boxnumber Side Area Execarea Public Members Getbox() Showbox ()
- Differentiate Between Protected .And Private Me~Bers of a Class. in Context of Object Oriented Programming. Also, Give a Suitable Example Illustrating Accessibility/Non-accessibility of Each Using a Class and an Object in C++.
- Which Function(S) Out of the Following Can Be Considered As An Overloaded Function(S) in the Same Program? Also, Write the Reason for Not Considering the Other(S) as an Overloaded Function(S)
- What is a copy constructor?
- Write a Definition for a Function Totalteachers( ) in C++ to Read Each Object of a Binary File Schools.Dat, Find the Total Number Teachers, Whose Data is Stored in the File and Display the Same. Assume that the File Schools.Dat is Created with the Help Objects of Class Schools, Which is Defined Below :
- A Text File Named Matter.Txt Contains Some Text Which Needs to Be Displayed Such that Every Next Character is Separated by a Symbol '#'. Write a Function Definition for Hashdisplay() in
- Find the Output of the Following C++ Code Considering that the Binary File School.Dat Exists on the Hard Disk with the Following Records of 10 Schools of the Class Schools as Declared in the Previous Question(4 B)
- The Following C++ Code During Compilation Reports Errors as Follows: Write the Names of the Correct Header Files, Which Must Be Included to Compile the Code Successfully
- Anil Typed the Following C++ Code and During Compilation, He Found Three Errors as Follows : on Asking, His Teacher Told Him to Include Necessary Header Files in the Code. Write the Names of the Header Files, Which Anil Needs to Include, for Successful Compilation and Execution of the Following Code
- Write Function Definition for Tower() in C++ to Read the Content of a Text File Writeup.Txt, Count the Presence of Word Tower and Display the Number of Occurrences of this Word
- Observe the Following Program Very Carefully and Write the Names of Those Header Files (S), Which Are Essentially Needed to Compile and Execute the Following Program Successfully :
- Find and Write the Output of the Following C++ Program Code : Note : Assume All Required Header Files Are Already Being Included in the Program.
- Write the Definition of a Function Addup(Int Arr[], Int N) in C++, in Which All Even Positions (I.E., 0,2,4, ... ) of the Array Should Be Added with the Content of the Element in the Next Position and Odd Positions (I.E., 1,3,5, ... ) Elements Should Be Incremented by 10
- Look at the Following C++ Code and Find the Possible Output from the Options (I) to (Iv) Following It. Also, Write the Highest and Lowest Values that Can Be Assigned to the Array A.
- Write the Definition of a Function Change(Int P[], Int N) in C++, Which Should Change All the Multiples of 10 in the Array to 10 and Rest of the Elements as 1. for Example, If an Array of 10 Integers is as Follows:
- Write a Definition for a Function Summidcol(Int Matrix [10], Int N, Int M) in C++, Which Finds the Sum of the Middle Column'S Elements of the Matrix (Assuming N Represents a Number of Rows and M Represents the Number of Columns, Which is an Odd Integer).
- Polina Raj Has Used a Text Editing Software to Type Some Text in an Article. After Saving the Article as Mynotes.Txt, She Realised that She Has Wrongly Typed Alphabet K in Place of Alphabet C Everywhere in the Article Write a Function Definition for Puretext() in C++ that Would Display the Corrected Version of the Entire Article of the File Mynotes.Txt with All the Alphabets "K" to Be Displayed as an Alphabet "C" on Screen
- Concept of Object Oriented Programming in C++
- Data Hiding in C++
- Data Encapsulation in C++
- Class and Object in C++
- Abstract Class and Concrete Class
- Polymorphism in C++
- Inheritance in C++
- Advantages of Object Oriented Programming Over Earlier Programming Methodologies in C++
- Definition of a Class in C++
- Member of a Class - Data Members and Member Functions (Methods)
- Using Private and Public Visibility Modes, Default Visibility Mode (Private)
- Member Function Definition - Inside Class Definition and Outside Class Definition Using Scope Resolution Operator (::)
- Accessing Members from Object (S)
- Objects as Function Arguments - Pass by Value and Pass by Reference
- Special Characteristics of Constructor
- Declaration and Definition of a Constructor
- Default Constructor
- Overloaded Constructors
- Copy Constructor
- Constructor with Default Arguments
- Special Characteristics of Destructor
- Declaration and Definition of Destructor
- Base Class in C++
- Derived Classes in C++
- Protected Visibility Mode
- Single Level Inheritance, Multilevel Inheritance and Multiple Inheritance in C++
- Privately Derived, Publicly Derived and Protectedly Derived Class
- Accessibility of Members from Objects and Within Derived Class (es)
- Data File Handling in C++ :- Need for a Data File, Types of Data Files - Text File and Binary File
- Basic File Operations on Text File - Creating/Writing Text into File, Reading and Manipulation of Text from an Already Existing Text File (Accessing Sequentially)
- Searching in Data Structure
- Implementation of Basic File Operations on Text and Binary File in C++
- Components of C++ to Be Used with File Handling
- Header File - fstream.h
- ifstream, ofstream, Classes
- Opening a Text File in - In, Out, and App Modes
- Using Cascading Operators (>>,<<) for Writing Text to the File and Reading Text from the File
- Open (), Get (), Read (), Put (), Write (), Getline () and Close () Functions
- Detecting End-of-file (With Or Without Using Eof() Function), Tellg(), Tellp(), Seekg(), Seekp()
- Introduction to Pointer
- Declaration and Initialization of Pointer
- Dynamic Memory Allocation/Deallocation Operators - New, Delete
- Pointers and Arrays - Array of Pointers, Pointer to an Array (1 Dimensional Array), Function Returning a Pointer, Reference Variables and Use of Alias
- Function Call by Reference
- Pointer to Structure - De-reference/Deference Operator:- *, ->
- Self Referential Structure