SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
OBJECT ORIENTED PROGRAMMING USING C++
Module-I
Short Question
2012
1. Differentiate between [2][Pointer]
int *F( );
int (*F)( );
2. What is the output of the following segment of code in C++: [2][Basics of C++]
int a=10, b;
b=a++ + a--;
cout<<b;
2011
1. Write the output of the following sets of C++ statements [2][Basics of C++]
void main( )
{
unsigned i=1;
signed j=1;
if(i<j)
cout<<” less”;
else if(i>j)
cout<<” greater”;
elseif(i==j)
cout<<”equal”;
}
2. How do you declare a multidimensional array and initialize its members? How many elements
are there in that array? [2][Array]
3. What is the difference between structure and union?[2][Basics of C++]
4. What is the difference between the address stored in a pointer and value stored at that address?
[2][Pointer]
2010
1. What is an iterator in c++? [2][Iterators]
2. What will be the output and why? [2][Pointer]
#include<iostream.h>
int main( )
{ const int a=20;
const int *ptr=&a;
OBJECT ORIENTED PROGRAMMING USING C++
cout<< *ptr<<endl;
(*ptr)++;
cout<<a<<endl;
return 0;
}
2009
1. What do you mean by Free store? What is its use in C++ programming? [2][Basics of C++]
2. What is the application of scope resolution operator in C++? [2][Operators in C++]
3. How do the following statements differ? [2][Pointers]
char *const p;
char const *p;
4. Give the syntax of declaring a pointer to a function? [2][Pointers]
2008
1. Which library file is included in each C++ program? Write the #include statement for that file
and explain why that files must be included? [2][Basics of C++]
2. How to read and print one character (including spaces) at a time from keyboard? [2][Basics of
C++]
3. List the three ways of passing arguments in or return value in C++. [2][Functions in C++]
4. What is the difference between cin.get and cin.getline? Give an example of each.[2][IO
operations]
5. What is the application of scope resolution :: operator in C++? [2][Operators in C++]
6. Re-write the following code segment using while loop; [2][control satement]
7. What is the output of the following segment of C++ code? [2.5][I/O operations]
int x=5, y=7, z=1;
cout<<z<<##<<++x<<##<<y++;
Long Question
2012
1. Write a program in C++ that prompts the user for an integer and then prints out all prime
numbers up to that integer. [5][Basics of C++]
2. What do you mean by pointer initialization? [5][Pointers]
State the Differences among;
char const *p;
char *const p;
const char *const p;
2011
1. Write down at least six properties of object oriented concepts that are not under concepts of
structural orientation. Explain using examples. [6][Introduction to C++]
2. Write a program in C++ using while loop to find the sum of first 100 even positive integers.
[5][Control statements]
OBJECT ORIENTED PROGRAMMING USING C++
3. Write a program in C++ to find the results of multiplication of two numbers of two dimensional
matrices. [5][Basics of C++]
2010
No Questions.
2009
1. Is it possible to return more than one value from a function? Justify with an example.
[5][Functions in C++]
2. Differentiate between the following: [2.5*2]
i. Implicit conversion and Explicit conversion. [Type conversion]
ii. Passing argument by value and passing by reference. [Function]
2008
1. Write a C++ function which takes as input a even positive integer n less than 100 and returns
the sum; 2+4+6+………….+n. [5][Functions]
2. Write a C++ program, which accepts from the keyboard a name, a date of birth (of the user),
check with the user if these data were accepted correctly, then display personal greetings to this
user, and display the date when user was exactly one year and one month old.[5][Basics of
C++]
3. Write a C++ program that contains a main ( ) function and two additional functions to compute
the area and perimeter of a square. The program should accept a number corresponding to the
side length of a square and display the area and perimeter of the square on the screen?
[5][Functions]
Module-II
Short Question
2012
1. Define ‘abstract class’. What is its use? [2][Polymorphism]
2. State differences between protected member and private member of a class.[2][Classes and
objects]
3. What is the use of this( )? [2][Polymorphism]
4. Whether a destructor can be virtual? Justify your answer. [2][Polymorphism]
5. Classify inheritance in C++. State its use. [2][Inheritance]
6. What is containership in C++? [2][Inheritance]
7. Define object slicing. [2][Classes and object]
8. What do you mean by static binding and dynamic binding? [2][Polymorphism]
OBJECT ORIENTED PROGRAMMING USING C++
2011
1. How many copies of a static member are shared between objects of the class? [2][Classes and
objects]
2. What are the benefits of using ADTs? [2][Introduction to C++]
3. What is the wrong in the following set of statements? [2][Classes and objects]
#include<iostream.h>
class my_class
{
int l;
public:
…
…
…
};
int main( )
{
my_class obj;
obj.l=15;
….
….
}
4. Find out the error in the following set of statements: [2][Constructor ]
class my_class
{
double a, b, c;
public:
double my_class ( );
};
5. Differentiate between friend and inheritance. [2][Classes and object, Inheritance]
6. ____________ keyword supports dynamic method resolution. [2][Basics of C++]
7. What is the implicit pointer that is passed as the first argument for non-static member
functions? [2][Classes and objects]
8. ____________ is the most general exception handler that catches exception of any type.
[2][Exception handling]
9. What are the differences between private, public and protected classes? [2][Classes and
objects]
10. What is a friend function? Explain using an example. [2][Functions]
11. What are the differences between Static binding and Dynamic binding? [2][Polymorphism]
12. How abstract data types and pure virtual functions are linked? Explain with an example.
[2][Polymorphism]
13. What is the difference between constructor and destructor? Explain using example.
[2][Constructor and destructor]
14. What are the virtual and pure virtual functions? Use this concept to draw a square and
rhombus. [2][polymorphism]
OBJECT ORIENTED PROGRAMMING USING C++
15. Differentiate between function overloading and operator overloading by giving example.
[2][Polymorphism]
2010
1. For the statement: [2][Polymorphism]
A ob;
ob = 20;
Which mechanism should be carried out for successful execution of the above statements?
2. What is the work of set terminate ( ) function? [2][Exception handling]
3. For the following function definition: [2][Functions]
void abc(int a, int b=10, int c=20)
{
cout<<a+b+c;
}
What will be the output of the following calls:
abc(5,6);
abc(50);
4. What is the work of catch(…)? [2][exception handling]
5. What is pure virtual function? Why it is used? [2][Polymorphism]
6. Describe call by reference.[2][Functions]
7. Define inline function. [2][Functions]
8. For the following declaration: [2][Functions]
#define sqr(x) {return x*x;}
What will be the result of the function call: sqr(4+4);
9. State at least two differences between an inline function and a macro substitution.
[2][Functions]
10. What will be the output and why? [2][Classes and objects]
#include <iostream.h>
class X
{ int i;
public:
static void f1( )
{ i=20;
i++;
}
void f2( )
{cout<< “i=”<<i<<endl;
}
};
int main( )
{
X ob1,ob2;
OBJECT ORIENTED PROGRAMMING USING C++
ob1.f1( );
ob2.f2( );
return 0;
}
11. Explain the two primary difference between a pointer variable and a reference variable.
[2][Basics of C++]
12. What will be the output and why? [2][Inheritance]
#include<iostream.h>
class X
{
public:
int p;
};
class Y: protected X
{
public:
int q;};
int main( )
{
Y yob;
yob.p=10;
yob.q=20;
cout<<yob.p<<” “<<yob.q<<endl;
return 0;
}
13. What will be the output and why? [2][Polymorphism]
#include<iostream.h>
class X
{
public:
void f1( )
{cout<<”X-men”<<endl;}
};
class Y:public X
{
public:
void f1( )
{cout<<”Y-men”<<endl;}
};
int main( )
{
X *xp;
Y yob;
xp=&yob;
OBJECT ORIENTED PROGRAMMING USING C++
xp->f1( );
return 0;
}
14. What will be the output and why? [2][Classes and objects]
#include<iostream.h>
class X
{
int i;
public:
static void f( int i)
{this->i=i; }
};
int main ( )
{
X xob;
xob.f(20);
return 0;
}
15. What will be the output and why? [2][Constructor and destructor]
#include<iostream.h>
class X
{
const int i;
public:
X(int p)
{ i=p;}
void f( )
{ cout<<”i=”<<i<<endl;}
};
int main( )
{
X ob(100);
ob.f();
return 0;
}
16. What will be the output and why? [2][Exception handling]
#include<iostream.h>
int main( )
{
cout<<”inside main”<<endl;
try
{
cout<<”inside try block”<<endl;
throw 22;
OBJECT ORIENTED PROGRAMMING USING C++
cout<<”exception thrown”<<endl;
}
catch(double d)
{
cout<<”caught an exception =”<<d;
}
cout<<”end”<<endl;
return 0;
}
2009
1. How is memory allocated to Classes and Objects? [2][Classes and objects]
2. What is containership? How it is different from inheritance? [2][Inheritance]
3. Which library function is called when an exception is thrown which is not mentioned in throw
clause of function definition? [2][Exception handling]
4. What will be the output of the following program; [2][Classes and objects]
#include<iostream.h>
using namespace std;
class X
{
static int i;
public:
void f1( )
{ i=20;
i++;
}
void f2( )
{
cout<<”i=”<<i<<endl
}
};
int main( )
{
X ob1, ob2;
ob1.f1( );
ob2.f2( );
return 0;
}
2008
1. What is an abstract class? Explain the use of abstract base class in C++. [2][Polymorphism]
2. What do you mean by dynamic initialization of object?[2][Dynamic memory]
OBJECT ORIENTED PROGRAMMING USING C++
Long Question
2012
1. Define a class MONEY, which maintains two integer data fields, dollar and cents. Overload the +,
- operators to add, subtract and input and output operators for your class. Can you overload the
* and / operators? If yes, what argument types should they accept? Overload the % operator so
that if n is a floating point value, n % m yields n percent of the money amount m.
[10][polymorphism]
2. Implement a class ACCOUNT. An account has a balance, functions to add and withdraw money
and a function to query the current balance. Charge a $5 penalty if an attempt is made to
withdraw more money than available in the account. [5][Classes and objects]
3. Derive a class MANAGER from EMPLOYEE. Add a data field, named department, of type string.
Supply a function print that prints the manager’s name, department and salary. Derive a class
EXECUTIVE from MANAGER. Supply a function print that prints the string Executive, followed
by the information stored in the MANAGER base object.[5][Inheritance]
4. Create a base class called SHAPE. Use this class to store two double type values that could be
used to compute the area of figures. Derive two special classes called TRIANGLE and
RECTANGLE from the base class. Add to the base class, a member function get_data( ) to
initialize base class data members and another member function display_area( ) to compute
and display the area figures. Make display_area( ) as a virtual function and redefine this
function in the derived classes to suit their requirement. Using these 3 classes, design a
program that will accept dimensions of a rectangle or a triangle interactively and display the
area.The two values given as input will be treated as length of two sides n case of rectangles and
a base and height in the case of triangles. [10][Polymorphism]
5. Distinguish between the following two statements:
time T2(T1); [4][constructors]
time T2=T1;
T1 and T2 are objects of time class.
6. Implement a 2× 2 MATRIX class that holds four floating point numbers, and a VECTOR class that
holds two floating point numbers. Supply constructors and print operators, but do not expose
the values of either class. Overload the multiplication operator so that a MATRIX can be
multiplied by a VECTOR object. To do this will you need to make VECTOR a friend of MATRIX.
[6][Polymorphism]
7. Write short notes on : [5*3]
i. Exception handling [exception handling]
ii. Aggregation [Inheritance]
iii. Virtual function vs Pure virtual function [Polymorphism]
2011
1. Write a C++ program using class and object with constructor to convert the Fahrenheit to
Celsius and vice versa. [5][Constructor]
2. Discuss the different forms of constructors with examples. [5][Constructor]
3. State any conflict that may rise due to multiple inheritances. Justify your answer.
[5][Inheritance]
OBJECT ORIENTED PROGRAMMING USING C++
4. Write short notes on try, throw and catch block in C++? [5][Exception handling]
5. What is pure virtual function? When do we make a virtual function pure? What is the
implication of making a pure virtual function? Explain with suitable examples.
[5][Polymorphism]
6. Write a program using pure virtual function to find out the area of circle, triangle, and square.
[5][Polymorphism]
7. Write a program to read two double type numbers from keyboard and a function to calculate
the division of these two numbers. A try block to throw an exception when a wrong type of data
is entered and another try block to throw an exception if the condition” division occurs”.
Appropriate catch block to handle the exception thrown. [5][Exception handling]
8. Write a function using reference variables as arguments to swap the values of pair of
integers.[4][Functions]
9. What are different types of inheritance? Explain with example. [5][Inheritance]
10. Define a class rectangle by inheriting from class point. The point should indicate the upper left
corner of the rectangle. What are the class attributes? What additional methods do you
introduce? [5][Inheritance]
11. Define a class to represent a bank account with following data members and member functions.
Data members: [6][Classes and objects]
a) Name of the customer
b) Account number
c) Type of account
d) Amount in account
Member function
a) To assign initial values
b) To deposit an amount
c) To withdraw an amount
d) To display name and balance
Write a main program to use the member functions.
12. Design the constructors for the classes mentioned in previous question. [4][Constructors]
13. Create a class FLOAT that contains one float data member. Overload all four arithmetic
operators so that they operate on the object of FLOAT. [5][Polymorphism]
14. Write a program that throws an exception when a wrong type of data is keyed in.
[5][Exception handling]
15. Write short notes on: [5*3]
a) Encapsulation [Introduction to C++]
b) Inline function [Functions]
c) Virtual destructor[Polymorphism]
2010
1. What is inheritance? Describe the various types of inheritances with examples for each one.
[10][Inheritance]
2. What is function overriding? How can we eliminate function overriding, describe with suitable
example.[10][Polymorphism]
3. Consider the following hierarchy:
OBJECT ORIENTED PROGRAMMING USING C++
Here A is the topmost parent class, B is its child, C is the child of B, and D is the child of C.
A is an abstract class containing member function get ( ) to read any value, which is
implemented in B and C for reading value i.e. get( ) in B reads value x as member and get( ) in C
reads value y as member, class D contains a member function add( ) to add x and y.
Write C++ program for the above. [10][Inheritance]
4. What is an exception; describe the mechanism of exception handling with suitable
example?[10][Exception handling]
5. What is a constructor; explain its types with suitable examples for each.[10][Constructors and
destructors]
6. Create a class complex with real and imaginary parts as member variables, member functions
get ( ) and display( ) to input and display the complex number respectively. Write a program
using above class to overload + and – operators for performing addition and subtraction of two
complex numbers. [10][Polymorphism]
7. Create two classes Meter and Centimeter to represent meter and centimeters respectively. Use
appropriate conversion routines to convert, [10][Classes and objects]
a) Meters to centimeters
b) Centimeters to meter
8. Create a class called Student which contains protected attributes such as stud_name, stud_roll
and stud_branch. Provide an appropriate method to take user input to initializes these
attributes and display the details regarding 50 students of a class. [5][Classes and objects]
9. Create a class called Area which contains method called “find_area”. Write down appropriate
code to create objects named as Circle and Rectangle of the above class and implement function
overloading to calculate area of a rectangle and area of a circle based upon user input.
[5][Polymorphism]
10. Write a C++ program to convert a primitive or built-in value such as int or float to a user
defined type value such as class A or class X. [5][Type conversion]
11. Write a C++ program where you can only be able to create a single instance of a class. Upon
trying to create a single instance of a class. Upon trying to create more than one number of
instances will result in termination of program. [5][Classes and objects]
12. Create a class called Point with two integer attributes such as x and y to represent its x-
coordinate and y-coordinate. Provide constructor to initialize the attributes. Provide another
method named as move ( ) which will move the coordinates only in the direction of x-axis for 10
OBJECT ORIENTED PROGRAMMING USING C++
units incrementing 1 unit at a time. Also display the new and old values of the coordinates.
[5][Constructor]
13. With an appropriate example explain the role of virtual base class removing ambiguities n case
of diamond inheritance which is a special case of multipath inheritance. [5][Inheritance]
14. Create an abstract class called Figure which contains a pure virtual function called fnd_area()
and a protected attribute named as area. Create two derived classes from the above class
named as Circle and Square having double type attribute named as radius and side respectively.
Implemented dynamic polymorphism to find out area of a circle and a square and show result.
[5][Inheritance]
15. Write a program to overload the pre-increment and post increment operators in a same
program using non member operator functions. [5][Polymorphism]
16. Suppose there is a class X with a double type attribute. Write a C++ program to create three
objects named as ob1, ob2, and ob3 of the above class and perform the following operation,
ob2=5.5+ob1;
ob3=ob1+6.7; [5][Classes and objects]
17. Write a complete program to create a class named as Student with protected attributes such as
id and marks. The attributes should be initialized only through constructors. The class contains
a public method named as show( ) to display the initialized attributes. Provide a mechanism to
create an array of student objects. The array should be given by the user at run time.
[5][Constructors]
18. Provide at least one good reason to choose a const reference rather than a reference variable as
parameter to a copy constructor. Explain with suitable example. [5][Constructor]
19. Write a program where you can achieve the following conversion within main( )
A ob1(10), ob2(101.5);
int i=ob1;
double d=ob2;
Where A is a user defined class. [5][Type conversion]
20. Write a complete program where you can restrict a user defined function to throw only int or
char type exception out of it. [5][Exception handling]
2009
1. Pure virtual functions force the programmer to redefine virtual functions inside derived
classes”. Comment on the statement. [5][polymorphism]
2. What is generic catch block? What are the restrictions while using a generic catch block?
Explain with an example. [5][Exception handling]
3. How do the properties of the following two derived classes differ? [3][Inheritance]
i. class X: private Y{//…..};
ii. class B: protected A{//….};
4. Describe various types of inheritance with suitable example. [5][Inheritance]
5. Define a class called Increment. The class contains one integer data member. Overload this
object of the class for both pre-increment and post-increment operator. [5][Polymorphism]
6. How to restore the access label of an inherited data member in derived class? Explain with the
help of C++ program? [5][Inheritance]
OBJECT ORIENTED PROGRAMMING USING C++
7. Differentiate between private, public and protected data members of the class with example.
[5][Classes and objects]
8. Differentiate between the following: [2.5*2]
i. Operator overloading and Function overloading [Polymorphism]
ii. Virtual member function and Non-virtual member function [Polymorphism]
2008
1. When do we declare a member of a class as static? What is a class? How does it accomplish data
hiding concept? [5][Classes and objects]
2. Can class members/methods be private? Can they be public? Which ones are accessible to
methods outside the class in which they are implemented? [5][Classes and objects]
3. Given a two dimensional m×n double array A. Declare the variable A, and write the C++ code
required to allocate and deallocate the array (assume that m and n are declared and their values
are known). [5][Classes and objects]
4. C++ allows for multiple inheritance which means that subclass can have more than one
superclasses. In this context the mechanism of virtual inheritance becomes important. Give an
example of multiple inheritance where virtual inheritance is essential. [4][Inheritance]
5. What is a class? How does it accomplish data hiding? Define a Student class with attributes and
functions that you fell most essential. [5][Classes and objects]
6. What does polymorphism mean in C++? How polymorphism is achieved at computer time and
runtime? Give an example of program that uses polymorphism. [5][Polymorphism]
7. Create a class FLOAT that contains one float data member. Overload all the four arithmetic
operators so that they operate on the objects of FLOAT. [5][Polymorphism]
8. What are the differences between structures and classes in C++? [2.5][Classes and objects]
9. Explain the use of constructors in C++ program design. [2.5][Constructors]
10. What is the difference between public, private and protected members of a class? [2.5] [Classes
and objects]
Module-III
Short Question
2012
No Questions
2011
1. ____________ provide facilities for organizing the names in a program to avoid name classes.
[2][Namespace]
2010
1. What is the difference between template class and class template?[2][Template]
OBJECT ORIENTED PROGRAMMING USING C++
2. What will be the output and why? [2][Template]
#include<iostream.h>
template<class T1>void f(T1 tt1)
{
cout<<”tt1=”<<tt1<<endl;
}
template<class T2>void f(T2 tt2)
{
cout<<”tt2=”<<tt2<<endl;
}
int main( )
{
f(1000);
f(101.7);
return 0;
}
2009
1. Explain the syntax and semantics of class template. [2][Template]
2. Distinguish between a namespace and a class. [2][Namespace]
3. What does RTTI mean? [2][Dynamic memory management]
2008
No Questions
Long Question
2012
1. Find errors if any, correct those, in the following code segment: [5][Template]
i. template<class T>
T max(T,T)
{….};
unsigned int m:
int main( )
{
max(m,200);
}
ii. template<class T>
class temp
{
T t;
public:
temp( ) {t=0;}
void show( ) {cout<<;}
OBJECT ORIENTED PROGRAMMING USING C++
};
void main( )
{
temp<void>x;
x.show( );
}
2. Write a program in C++ to convert a given decimal number to binary using template function.
[5][Template]
3. Write short notes on: Object Oriented Design. [5][object oriented design]
2011
1. Can we use compiler generated default assignment operator in case our class is using dynamic
memory? Justify your answer. [3][Dynamic memory management]
2.
i. Differentiate between class template and template class with examples?
[2.5][Template]
ii. Write short notes on STL [2.5][Standard template library]
3. Write a function template for finding the minimum value contained in an array. [5][Template]
4. Define a namespace named Constants that contains declaration of some constants. Write a
program that uses the constants defined in the namespace Constants. [4][Namespace]
2010
1. Write a complete program to declare and define a generic function that is capable of
arranging any kind of elements in descending order. [5][Template]
2009
1. Write a template function alloc that takes two parameters; [5][Template]
n: the size of the array to allocate,
val: a value type T.
The alloc function should allocate an array of type T with n elements and set all elements in
the array to value val, a pointer to array is returned.
2. Write a program in C++ to overload a function template? [4][Template]
2008
1. Write a template function alloc that takes two parameters; [5][Template]
n: the size of the array to allocate,
val: a value type T.
The alloc function should allocate an array of type T with n elements and set all elements in the
array to value val, a pointer to array is returned.
2. What file is included to test if character read is alpha-numeric, uppercase? Write code to count
how many lowercase letters and digits are in a given input? [5][File Handling]

Más contenido relacionado

La actualidad más candente

20.3 Java encapsulation
20.3 Java encapsulation20.3 Java encapsulation
20.3 Java encapsulationIntro C# Book
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1kvs
 
Learning C++ - Class 4
Learning C++ - Class 4Learning C++ - Class 4
Learning C++ - Class 4Ali Aminian
 
04. constructor & destructor
04. constructor & destructor04. constructor & destructor
04. constructor & destructorHaresh Jaiswal
 
Sample Question Paper IP Class xii
Sample Question Paper IP Class xii Sample Question Paper IP Class xii
Sample Question Paper IP Class xii kvs
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingRenas Rekany
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...FarhanAhmade
 
Resource wrappers in C++
Resource wrappers in C++Resource wrappers in C++
Resource wrappers in C++Ilio Catallo
 
Java basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaJava basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaSanjeev Tripathi
 
Practices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerPractices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerSrikanth Shreenivas
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsVineeta Garg
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 FarhanAhmade
 

La actualidad más candente (17)

20.3 Java encapsulation
20.3 Java encapsulation20.3 Java encapsulation
20.3 Java encapsulation
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
Learning C++ - Class 4
Learning C++ - Class 4Learning C++ - Class 4
Learning C++ - Class 4
 
Qno 2 (a)
Qno 2 (a)Qno 2 (a)
Qno 2 (a)
 
Constructor and destructor in C++
Constructor and destructor in C++Constructor and destructor in C++
Constructor and destructor in C++
 
04. constructor & destructor
04. constructor & destructor04. constructor & destructor
04. constructor & destructor
 
Computer Programming- Lecture 8
Computer Programming- Lecture 8Computer Programming- Lecture 8
Computer Programming- Lecture 8
 
Sample paper i.p
Sample paper i.pSample paper i.p
Sample paper i.p
 
Sample Question Paper IP Class xii
Sample Question Paper IP Class xii Sample Question Paper IP Class xii
Sample Question Paper IP Class xii
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
 
Lecture09
Lecture09Lecture09
Lecture09
 
Resource wrappers in C++
Resource wrappers in C++Resource wrappers in C++
Resource wrappers in C++
 
Java basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaJava basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini india
 
Practices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerPractices For Becoming A Better Programmer
Practices For Becoming A Better Programmer
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021
 

Similar a Module wise format oops questions

Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Deepak Singh
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011Deepak Singh
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGAmira Dolce Farhana
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2Swarup Kumar Boro
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Poonam Chopra
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperHarish Gyanani
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented TechnologiesUmesh Nikam
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013Syahriha Ruslan
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperDeepak Singh
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 solIIUM
 
Aae oop xp_02
Aae oop xp_02Aae oop xp_02
Aae oop xp_02Niit Care
 
Computer science ms
Computer science msComputer science ms
Computer science msB Bhuvanesh
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
C# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slidesC# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slidesSami Mut
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical fileAnkit Dixit
 

Similar a Module wise format oops questions (20)

Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
 
Xiicsmonth
XiicsmonthXiicsmonth
Xiicsmonth
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 
C++ Programming
C++ ProgrammingC++ Programming
C++ Programming
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paper
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
Sample paper
Sample paperSample paper
Sample paper
 
Aae oop xp_02
Aae oop xp_02Aae oop xp_02
Aae oop xp_02
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
C# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slidesC# Tutorial MSM_Murach chapter-15-slides
C# Tutorial MSM_Murach chapter-15-slides
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
 

Más de SANTOSH RATH

Lesson plan proforma database management system
Lesson plan proforma database management systemLesson plan proforma database management system
Lesson plan proforma database management systemSANTOSH RATH
 
Lesson plan proforma progrmming in c
Lesson plan proforma progrmming in cLesson plan proforma progrmming in c
Lesson plan proforma progrmming in cSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
( Becs 2208 ) database management system
( Becs 2208 ) database management system( Becs 2208 ) database management system
( Becs 2208 ) database management systemSANTOSH RATH
 
Expected Questions TC
Expected Questions TCExpected Questions TC
Expected Questions TCSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbmsSANTOSH RATH
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbmsSANTOSH RATH
 
Oops model question
Oops model questionOops model question
Oops model questionSANTOSH RATH
 
System programming note
System programming noteSystem programming note
System programming noteSANTOSH RATH
 
Operating system notes
Operating system notesOperating system notes
Operating system notesSANTOSH RATH
 

Más de SANTOSH RATH (20)

Lesson plan proforma database management system
Lesson plan proforma database management systemLesson plan proforma database management system
Lesson plan proforma database management system
 
Lesson plan proforma progrmming in c
Lesson plan proforma progrmming in cLesson plan proforma progrmming in c
Lesson plan proforma progrmming in c
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
2011dbms
2011dbms2011dbms
2011dbms
 
2006dbms
2006dbms2006dbms
2006dbms
 
( Becs 2208 ) database management system
( Becs 2208 ) database management system( Becs 2208 ) database management system
( Becs 2208 ) database management system
 
Rdbms2010
Rdbms2010Rdbms2010
Rdbms2010
 
Expected Questions TC
Expected Questions TCExpected Questions TC
Expected Questions TC
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbms
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbms
 
Oops model question
Oops model questionOops model question
Oops model question
 
System programming note
System programming noteSystem programming note
System programming note
 
Operating system notes
Operating system notesOperating system notes
Operating system notes
 
Os notes
Os notesOs notes
Os notes
 
OS ASSIGNMENT 2
OS ASSIGNMENT 2OS ASSIGNMENT 2
OS ASSIGNMENT 2
 
OS ASSIGNMENT-1
OS ASSIGNMENT-1OS ASSIGNMENT-1
OS ASSIGNMENT-1
 
OS ASSIGNMENT 3
OS ASSIGNMENT 3OS ASSIGNMENT 3
OS ASSIGNMENT 3
 
Ds using c 2009
Ds using c 2009Ds using c 2009
Ds using c 2009
 

Último

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 

Último (20)

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 

Module wise format oops questions

  • 1. OBJECT ORIENTED PROGRAMMING USING C++ Module-I Short Question 2012 1. Differentiate between [2][Pointer] int *F( ); int (*F)( ); 2. What is the output of the following segment of code in C++: [2][Basics of C++] int a=10, b; b=a++ + a--; cout<<b; 2011 1. Write the output of the following sets of C++ statements [2][Basics of C++] void main( ) { unsigned i=1; signed j=1; if(i<j) cout<<” less”; else if(i>j) cout<<” greater”; elseif(i==j) cout<<”equal”; } 2. How do you declare a multidimensional array and initialize its members? How many elements are there in that array? [2][Array] 3. What is the difference between structure and union?[2][Basics of C++] 4. What is the difference between the address stored in a pointer and value stored at that address? [2][Pointer] 2010 1. What is an iterator in c++? [2][Iterators] 2. What will be the output and why? [2][Pointer] #include<iostream.h> int main( ) { const int a=20; const int *ptr=&a;
  • 2. OBJECT ORIENTED PROGRAMMING USING C++ cout<< *ptr<<endl; (*ptr)++; cout<<a<<endl; return 0; } 2009 1. What do you mean by Free store? What is its use in C++ programming? [2][Basics of C++] 2. What is the application of scope resolution operator in C++? [2][Operators in C++] 3. How do the following statements differ? [2][Pointers] char *const p; char const *p; 4. Give the syntax of declaring a pointer to a function? [2][Pointers] 2008 1. Which library file is included in each C++ program? Write the #include statement for that file and explain why that files must be included? [2][Basics of C++] 2. How to read and print one character (including spaces) at a time from keyboard? [2][Basics of C++] 3. List the three ways of passing arguments in or return value in C++. [2][Functions in C++] 4. What is the difference between cin.get and cin.getline? Give an example of each.[2][IO operations] 5. What is the application of scope resolution :: operator in C++? [2][Operators in C++] 6. Re-write the following code segment using while loop; [2][control satement] 7. What is the output of the following segment of C++ code? [2.5][I/O operations] int x=5, y=7, z=1; cout<<z<<##<<++x<<##<<y++; Long Question 2012 1. Write a program in C++ that prompts the user for an integer and then prints out all prime numbers up to that integer. [5][Basics of C++] 2. What do you mean by pointer initialization? [5][Pointers] State the Differences among; char const *p; char *const p; const char *const p; 2011 1. Write down at least six properties of object oriented concepts that are not under concepts of structural orientation. Explain using examples. [6][Introduction to C++] 2. Write a program in C++ using while loop to find the sum of first 100 even positive integers. [5][Control statements]
  • 3. OBJECT ORIENTED PROGRAMMING USING C++ 3. Write a program in C++ to find the results of multiplication of two numbers of two dimensional matrices. [5][Basics of C++] 2010 No Questions. 2009 1. Is it possible to return more than one value from a function? Justify with an example. [5][Functions in C++] 2. Differentiate between the following: [2.5*2] i. Implicit conversion and Explicit conversion. [Type conversion] ii. Passing argument by value and passing by reference. [Function] 2008 1. Write a C++ function which takes as input a even positive integer n less than 100 and returns the sum; 2+4+6+………….+n. [5][Functions] 2. Write a C++ program, which accepts from the keyboard a name, a date of birth (of the user), check with the user if these data were accepted correctly, then display personal greetings to this user, and display the date when user was exactly one year and one month old.[5][Basics of C++] 3. Write a C++ program that contains a main ( ) function and two additional functions to compute the area and perimeter of a square. The program should accept a number corresponding to the side length of a square and display the area and perimeter of the square on the screen? [5][Functions] Module-II Short Question 2012 1. Define ‘abstract class’. What is its use? [2][Polymorphism] 2. State differences between protected member and private member of a class.[2][Classes and objects] 3. What is the use of this( )? [2][Polymorphism] 4. Whether a destructor can be virtual? Justify your answer. [2][Polymorphism] 5. Classify inheritance in C++. State its use. [2][Inheritance] 6. What is containership in C++? [2][Inheritance] 7. Define object slicing. [2][Classes and object] 8. What do you mean by static binding and dynamic binding? [2][Polymorphism]
  • 4. OBJECT ORIENTED PROGRAMMING USING C++ 2011 1. How many copies of a static member are shared between objects of the class? [2][Classes and objects] 2. What are the benefits of using ADTs? [2][Introduction to C++] 3. What is the wrong in the following set of statements? [2][Classes and objects] #include<iostream.h> class my_class { int l; public: … … … }; int main( ) { my_class obj; obj.l=15; …. …. } 4. Find out the error in the following set of statements: [2][Constructor ] class my_class { double a, b, c; public: double my_class ( ); }; 5. Differentiate between friend and inheritance. [2][Classes and object, Inheritance] 6. ____________ keyword supports dynamic method resolution. [2][Basics of C++] 7. What is the implicit pointer that is passed as the first argument for non-static member functions? [2][Classes and objects] 8. ____________ is the most general exception handler that catches exception of any type. [2][Exception handling] 9. What are the differences between private, public and protected classes? [2][Classes and objects] 10. What is a friend function? Explain using an example. [2][Functions] 11. What are the differences between Static binding and Dynamic binding? [2][Polymorphism] 12. How abstract data types and pure virtual functions are linked? Explain with an example. [2][Polymorphism] 13. What is the difference between constructor and destructor? Explain using example. [2][Constructor and destructor] 14. What are the virtual and pure virtual functions? Use this concept to draw a square and rhombus. [2][polymorphism]
  • 5. OBJECT ORIENTED PROGRAMMING USING C++ 15. Differentiate between function overloading and operator overloading by giving example. [2][Polymorphism] 2010 1. For the statement: [2][Polymorphism] A ob; ob = 20; Which mechanism should be carried out for successful execution of the above statements? 2. What is the work of set terminate ( ) function? [2][Exception handling] 3. For the following function definition: [2][Functions] void abc(int a, int b=10, int c=20) { cout<<a+b+c; } What will be the output of the following calls: abc(5,6); abc(50); 4. What is the work of catch(…)? [2][exception handling] 5. What is pure virtual function? Why it is used? [2][Polymorphism] 6. Describe call by reference.[2][Functions] 7. Define inline function. [2][Functions] 8. For the following declaration: [2][Functions] #define sqr(x) {return x*x;} What will be the result of the function call: sqr(4+4); 9. State at least two differences between an inline function and a macro substitution. [2][Functions] 10. What will be the output and why? [2][Classes and objects] #include <iostream.h> class X { int i; public: static void f1( ) { i=20; i++; } void f2( ) {cout<< “i=”<<i<<endl; } }; int main( ) { X ob1,ob2;
  • 6. OBJECT ORIENTED PROGRAMMING USING C++ ob1.f1( ); ob2.f2( ); return 0; } 11. Explain the two primary difference between a pointer variable and a reference variable. [2][Basics of C++] 12. What will be the output and why? [2][Inheritance] #include<iostream.h> class X { public: int p; }; class Y: protected X { public: int q;}; int main( ) { Y yob; yob.p=10; yob.q=20; cout<<yob.p<<” “<<yob.q<<endl; return 0; } 13. What will be the output and why? [2][Polymorphism] #include<iostream.h> class X { public: void f1( ) {cout<<”X-men”<<endl;} }; class Y:public X { public: void f1( ) {cout<<”Y-men”<<endl;} }; int main( ) { X *xp; Y yob; xp=&yob;
  • 7. OBJECT ORIENTED PROGRAMMING USING C++ xp->f1( ); return 0; } 14. What will be the output and why? [2][Classes and objects] #include<iostream.h> class X { int i; public: static void f( int i) {this->i=i; } }; int main ( ) { X xob; xob.f(20); return 0; } 15. What will be the output and why? [2][Constructor and destructor] #include<iostream.h> class X { const int i; public: X(int p) { i=p;} void f( ) { cout<<”i=”<<i<<endl;} }; int main( ) { X ob(100); ob.f(); return 0; } 16. What will be the output and why? [2][Exception handling] #include<iostream.h> int main( ) { cout<<”inside main”<<endl; try { cout<<”inside try block”<<endl; throw 22;
  • 8. OBJECT ORIENTED PROGRAMMING USING C++ cout<<”exception thrown”<<endl; } catch(double d) { cout<<”caught an exception =”<<d; } cout<<”end”<<endl; return 0; } 2009 1. How is memory allocated to Classes and Objects? [2][Classes and objects] 2. What is containership? How it is different from inheritance? [2][Inheritance] 3. Which library function is called when an exception is thrown which is not mentioned in throw clause of function definition? [2][Exception handling] 4. What will be the output of the following program; [2][Classes and objects] #include<iostream.h> using namespace std; class X { static int i; public: void f1( ) { i=20; i++; } void f2( ) { cout<<”i=”<<i<<endl } }; int main( ) { X ob1, ob2; ob1.f1( ); ob2.f2( ); return 0; } 2008 1. What is an abstract class? Explain the use of abstract base class in C++. [2][Polymorphism] 2. What do you mean by dynamic initialization of object?[2][Dynamic memory]
  • 9. OBJECT ORIENTED PROGRAMMING USING C++ Long Question 2012 1. Define a class MONEY, which maintains two integer data fields, dollar and cents. Overload the +, - operators to add, subtract and input and output operators for your class. Can you overload the * and / operators? If yes, what argument types should they accept? Overload the % operator so that if n is a floating point value, n % m yields n percent of the money amount m. [10][polymorphism] 2. Implement a class ACCOUNT. An account has a balance, functions to add and withdraw money and a function to query the current balance. Charge a $5 penalty if an attempt is made to withdraw more money than available in the account. [5][Classes and objects] 3. Derive a class MANAGER from EMPLOYEE. Add a data field, named department, of type string. Supply a function print that prints the manager’s name, department and salary. Derive a class EXECUTIVE from MANAGER. Supply a function print that prints the string Executive, followed by the information stored in the MANAGER base object.[5][Inheritance] 4. Create a base class called SHAPE. Use this class to store two double type values that could be used to compute the area of figures. Derive two special classes called TRIANGLE and RECTANGLE from the base class. Add to the base class, a member function get_data( ) to initialize base class data members and another member function display_area( ) to compute and display the area figures. Make display_area( ) as a virtual function and redefine this function in the derived classes to suit their requirement. Using these 3 classes, design a program that will accept dimensions of a rectangle or a triangle interactively and display the area.The two values given as input will be treated as length of two sides n case of rectangles and a base and height in the case of triangles. [10][Polymorphism] 5. Distinguish between the following two statements: time T2(T1); [4][constructors] time T2=T1; T1 and T2 are objects of time class. 6. Implement a 2× 2 MATRIX class that holds four floating point numbers, and a VECTOR class that holds two floating point numbers. Supply constructors and print operators, but do not expose the values of either class. Overload the multiplication operator so that a MATRIX can be multiplied by a VECTOR object. To do this will you need to make VECTOR a friend of MATRIX. [6][Polymorphism] 7. Write short notes on : [5*3] i. Exception handling [exception handling] ii. Aggregation [Inheritance] iii. Virtual function vs Pure virtual function [Polymorphism] 2011 1. Write a C++ program using class and object with constructor to convert the Fahrenheit to Celsius and vice versa. [5][Constructor] 2. Discuss the different forms of constructors with examples. [5][Constructor] 3. State any conflict that may rise due to multiple inheritances. Justify your answer. [5][Inheritance]
  • 10. OBJECT ORIENTED PROGRAMMING USING C++ 4. Write short notes on try, throw and catch block in C++? [5][Exception handling] 5. What is pure virtual function? When do we make a virtual function pure? What is the implication of making a pure virtual function? Explain with suitable examples. [5][Polymorphism] 6. Write a program using pure virtual function to find out the area of circle, triangle, and square. [5][Polymorphism] 7. Write a program to read two double type numbers from keyboard and a function to calculate the division of these two numbers. A try block to throw an exception when a wrong type of data is entered and another try block to throw an exception if the condition” division occurs”. Appropriate catch block to handle the exception thrown. [5][Exception handling] 8. Write a function using reference variables as arguments to swap the values of pair of integers.[4][Functions] 9. What are different types of inheritance? Explain with example. [5][Inheritance] 10. Define a class rectangle by inheriting from class point. The point should indicate the upper left corner of the rectangle. What are the class attributes? What additional methods do you introduce? [5][Inheritance] 11. Define a class to represent a bank account with following data members and member functions. Data members: [6][Classes and objects] a) Name of the customer b) Account number c) Type of account d) Amount in account Member function a) To assign initial values b) To deposit an amount c) To withdraw an amount d) To display name and balance Write a main program to use the member functions. 12. Design the constructors for the classes mentioned in previous question. [4][Constructors] 13. Create a class FLOAT that contains one float data member. Overload all four arithmetic operators so that they operate on the object of FLOAT. [5][Polymorphism] 14. Write a program that throws an exception when a wrong type of data is keyed in. [5][Exception handling] 15. Write short notes on: [5*3] a) Encapsulation [Introduction to C++] b) Inline function [Functions] c) Virtual destructor[Polymorphism] 2010 1. What is inheritance? Describe the various types of inheritances with examples for each one. [10][Inheritance] 2. What is function overriding? How can we eliminate function overriding, describe with suitable example.[10][Polymorphism] 3. Consider the following hierarchy:
  • 11. OBJECT ORIENTED PROGRAMMING USING C++ Here A is the topmost parent class, B is its child, C is the child of B, and D is the child of C. A is an abstract class containing member function get ( ) to read any value, which is implemented in B and C for reading value i.e. get( ) in B reads value x as member and get( ) in C reads value y as member, class D contains a member function add( ) to add x and y. Write C++ program for the above. [10][Inheritance] 4. What is an exception; describe the mechanism of exception handling with suitable example?[10][Exception handling] 5. What is a constructor; explain its types with suitable examples for each.[10][Constructors and destructors] 6. Create a class complex with real and imaginary parts as member variables, member functions get ( ) and display( ) to input and display the complex number respectively. Write a program using above class to overload + and – operators for performing addition and subtraction of two complex numbers. [10][Polymorphism] 7. Create two classes Meter and Centimeter to represent meter and centimeters respectively. Use appropriate conversion routines to convert, [10][Classes and objects] a) Meters to centimeters b) Centimeters to meter 8. Create a class called Student which contains protected attributes such as stud_name, stud_roll and stud_branch. Provide an appropriate method to take user input to initializes these attributes and display the details regarding 50 students of a class. [5][Classes and objects] 9. Create a class called Area which contains method called “find_area”. Write down appropriate code to create objects named as Circle and Rectangle of the above class and implement function overloading to calculate area of a rectangle and area of a circle based upon user input. [5][Polymorphism] 10. Write a C++ program to convert a primitive or built-in value such as int or float to a user defined type value such as class A or class X. [5][Type conversion] 11. Write a C++ program where you can only be able to create a single instance of a class. Upon trying to create a single instance of a class. Upon trying to create more than one number of instances will result in termination of program. [5][Classes and objects] 12. Create a class called Point with two integer attributes such as x and y to represent its x- coordinate and y-coordinate. Provide constructor to initialize the attributes. Provide another method named as move ( ) which will move the coordinates only in the direction of x-axis for 10
  • 12. OBJECT ORIENTED PROGRAMMING USING C++ units incrementing 1 unit at a time. Also display the new and old values of the coordinates. [5][Constructor] 13. With an appropriate example explain the role of virtual base class removing ambiguities n case of diamond inheritance which is a special case of multipath inheritance. [5][Inheritance] 14. Create an abstract class called Figure which contains a pure virtual function called fnd_area() and a protected attribute named as area. Create two derived classes from the above class named as Circle and Square having double type attribute named as radius and side respectively. Implemented dynamic polymorphism to find out area of a circle and a square and show result. [5][Inheritance] 15. Write a program to overload the pre-increment and post increment operators in a same program using non member operator functions. [5][Polymorphism] 16. Suppose there is a class X with a double type attribute. Write a C++ program to create three objects named as ob1, ob2, and ob3 of the above class and perform the following operation, ob2=5.5+ob1; ob3=ob1+6.7; [5][Classes and objects] 17. Write a complete program to create a class named as Student with protected attributes such as id and marks. The attributes should be initialized only through constructors. The class contains a public method named as show( ) to display the initialized attributes. Provide a mechanism to create an array of student objects. The array should be given by the user at run time. [5][Constructors] 18. Provide at least one good reason to choose a const reference rather than a reference variable as parameter to a copy constructor. Explain with suitable example. [5][Constructor] 19. Write a program where you can achieve the following conversion within main( ) A ob1(10), ob2(101.5); int i=ob1; double d=ob2; Where A is a user defined class. [5][Type conversion] 20. Write a complete program where you can restrict a user defined function to throw only int or char type exception out of it. [5][Exception handling] 2009 1. Pure virtual functions force the programmer to redefine virtual functions inside derived classes”. Comment on the statement. [5][polymorphism] 2. What is generic catch block? What are the restrictions while using a generic catch block? Explain with an example. [5][Exception handling] 3. How do the properties of the following two derived classes differ? [3][Inheritance] i. class X: private Y{//…..}; ii. class B: protected A{//….}; 4. Describe various types of inheritance with suitable example. [5][Inheritance] 5. Define a class called Increment. The class contains one integer data member. Overload this object of the class for both pre-increment and post-increment operator. [5][Polymorphism] 6. How to restore the access label of an inherited data member in derived class? Explain with the help of C++ program? [5][Inheritance]
  • 13. OBJECT ORIENTED PROGRAMMING USING C++ 7. Differentiate between private, public and protected data members of the class with example. [5][Classes and objects] 8. Differentiate between the following: [2.5*2] i. Operator overloading and Function overloading [Polymorphism] ii. Virtual member function and Non-virtual member function [Polymorphism] 2008 1. When do we declare a member of a class as static? What is a class? How does it accomplish data hiding concept? [5][Classes and objects] 2. Can class members/methods be private? Can they be public? Which ones are accessible to methods outside the class in which they are implemented? [5][Classes and objects] 3. Given a two dimensional m×n double array A. Declare the variable A, and write the C++ code required to allocate and deallocate the array (assume that m and n are declared and their values are known). [5][Classes and objects] 4. C++ allows for multiple inheritance which means that subclass can have more than one superclasses. In this context the mechanism of virtual inheritance becomes important. Give an example of multiple inheritance where virtual inheritance is essential. [4][Inheritance] 5. What is a class? How does it accomplish data hiding? Define a Student class with attributes and functions that you fell most essential. [5][Classes and objects] 6. What does polymorphism mean in C++? How polymorphism is achieved at computer time and runtime? Give an example of program that uses polymorphism. [5][Polymorphism] 7. Create a class FLOAT that contains one float data member. Overload all the four arithmetic operators so that they operate on the objects of FLOAT. [5][Polymorphism] 8. What are the differences between structures and classes in C++? [2.5][Classes and objects] 9. Explain the use of constructors in C++ program design. [2.5][Constructors] 10. What is the difference between public, private and protected members of a class? [2.5] [Classes and objects] Module-III Short Question 2012 No Questions 2011 1. ____________ provide facilities for organizing the names in a program to avoid name classes. [2][Namespace] 2010 1. What is the difference between template class and class template?[2][Template]
  • 14. OBJECT ORIENTED PROGRAMMING USING C++ 2. What will be the output and why? [2][Template] #include<iostream.h> template<class T1>void f(T1 tt1) { cout<<”tt1=”<<tt1<<endl; } template<class T2>void f(T2 tt2) { cout<<”tt2=”<<tt2<<endl; } int main( ) { f(1000); f(101.7); return 0; } 2009 1. Explain the syntax and semantics of class template. [2][Template] 2. Distinguish between a namespace and a class. [2][Namespace] 3. What does RTTI mean? [2][Dynamic memory management] 2008 No Questions Long Question 2012 1. Find errors if any, correct those, in the following code segment: [5][Template] i. template<class T> T max(T,T) {….}; unsigned int m: int main( ) { max(m,200); } ii. template<class T> class temp { T t; public: temp( ) {t=0;} void show( ) {cout<<;}
  • 15. OBJECT ORIENTED PROGRAMMING USING C++ }; void main( ) { temp<void>x; x.show( ); } 2. Write a program in C++ to convert a given decimal number to binary using template function. [5][Template] 3. Write short notes on: Object Oriented Design. [5][object oriented design] 2011 1. Can we use compiler generated default assignment operator in case our class is using dynamic memory? Justify your answer. [3][Dynamic memory management] 2. i. Differentiate between class template and template class with examples? [2.5][Template] ii. Write short notes on STL [2.5][Standard template library] 3. Write a function template for finding the minimum value contained in an array. [5][Template] 4. Define a namespace named Constants that contains declaration of some constants. Write a program that uses the constants defined in the namespace Constants. [4][Namespace] 2010 1. Write a complete program to declare and define a generic function that is capable of arranging any kind of elements in descending order. [5][Template] 2009 1. Write a template function alloc that takes two parameters; [5][Template] n: the size of the array to allocate, val: a value type T. The alloc function should allocate an array of type T with n elements and set all elements in the array to value val, a pointer to array is returned. 2. Write a program in C++ to overload a function template? [4][Template] 2008 1. Write a template function alloc that takes two parameters; [5][Template] n: the size of the array to allocate, val: a value type T. The alloc function should allocate an array of type T with n elements and set all elements in the array to value val, a pointer to array is returned. 2. What file is included to test if character read is alpha-numeric, uppercase? Write code to count how many lowercase letters and digits are in a given input? [5][File Handling]