Preview

OOPs Using C++ Question Bank

Powerful Essays
Open Document
Open Document
778 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
OOPs Using C++ Question Bank
OBJECT ORIENTED
PROGRAMMING (OOP)
USING C++
A QUESTION BANK
Chinmay D.Bhamare

2014

CHINMAY D BHAMARE,CHALISGAON

Its my first Object Oriented Programming (OOP) language Question Bank. In this notes all types of question are available related to c++. Most of the questions are related to BCA syllabus.
So enjoy this notes and make your study easy
- chinmay D. Bhamare
(Smt.S.M.Agrrawal Inst.Of Mgt.,Chalisgaon)

Write Ans. Of Following Question .
What is class?
The class is one of the defining ideas of object-oriented programming. Among the important ideas about classes are:




A class can have subclasses that can inherit all or some of the characteristics of the class. In relation to each subclass, the class becomes the superclass.
Subclasses can also define their own methods and variables that are not part of their superclass. The structure of a class and its subclasses is called the class hierarchy.

Data Types ?
Boolean –bool
Character -char
Integer -int
Floating point- float
Double floating point- double
Valueless- void
Wide Character –wchar_t

What is Object ?
A class provides the blueprints for objects, so basically an object is created from a class. We declare objects of a class with exactly the same sort of declaration that we declare variables of basic types. Following statements declare two objects of class Box:
Box Box1;
Box Box2;

// Declare Box1 of type Box
// Declare Box2 of type Box

Use of Delete operator ?

Using the delete operator on an object deallocates its memory. A program that dereferences a pointer after the object is deleted can have unpredictable results or crash.
When delete is used to deallocate memory for a C++ class object, the object's destructor is called before the object's memory is deallocated (if the object has a destructor).
If the operand to the delete operator is a modifiable l-value, its value is undefined after the object is deleted. int* set = new int[100];

You May Also Find These Documents Helpful

Related Topics