We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
For More Question Papers Visit - www.pediawikiblog.com
15EC562
Fifth Semester B.E. Degree Examination, Dec.2017/Jan.2018
Object Oriented Programming Using C++
Time: 3 hrs. Max. Marks: 80
Note: Answer any FIVE full questions, choosing one full question from each module.
Module-1
Define and hence give the syntax for declaring a variable. State the rules to be followed for
declaring variables in C++. (04 Marks)
What is Dynamic memory management? Explain ‘new’ and ‘delete’ operator with an
example. (06 Marks)
What are Enumerations in C++? Explain with an example. (06 Marks)
OR
What are data types in C++? List all the built in and derived data types with examples.
(06 Marks)
With syntax and example give the control structures for switch and while statement
(07 Marks)
Give the examples for Relational, logical and Bitwise expressions available in C++
(03 Marks)
Module-2
What are inline functions? Why are they used? Explain with an example. List the situations
where inline function cannot be used? (08 Marks)
Define a class and object. Write a C++ program to define a class called student with roll
number, name and percentage as its data members and getdata ( ), printdata () as member
functions. (08 Marks)
OR
Write a program to create a class called employee consisting of name, designation, id and
salary as class data variables, Using this class, print 5 employee information by reading the
information of employee. Write the main program to create objects and call a member
functions from class. (08 Marks)
‘What is a friend function? Give its characteristics. Write a program to find mean value of 2
numbers using friend function (08 Marks)
Module-3
Define a constructor and destructors with examples. Illustrate the working of both with
sample programs. (08 Marks)
Write a C++ program containing two data members height and base, use a constructor to set
height and base with area ( ) and display () as member function to calculate area of a
triangle (08 Marks)
For More Question Papers Visit - www.pediawikiblog.com10
For More Question Papers Visit - www.pediawikiblog.com
OR
‘Mention the types of operators that cannot be overloaded. (02 Marks)
What is a copy constructor? Illustrate the working of copy constructor with a program
(06 Marks)
Discuss the principle of operator overloading, Write a C++ program to add two complex
numbers by overloading operator. (08 Marks)
Mod
How is polymorphism achieved in OOPS with virtual functions? Explain with an example.
(08 Marks)
What are pure virtual functions? (02 Marks)
Explain the role of ‘this’ pointer with an example. (06 Marks)
OR
Give the syntax and example for defining derived class. Explain the access specifiers public,
private and protected with examples (08 Marks)
Explain the following with reference to OOPS
i) Single inheritance
ii) Multiple inheritances. (08 Marks)
Modale-5
‘What are streams in C++? List and explain all the stream classes used for file operations.
(08 Marks)
Explain the role with examples for unformatted 1/O operation functions
i) Put()
ii) get ()
iii) getline ()
iv) write () (08 Marks)
OR
What are file input and output streams? Write a program for writing to and reading the data
from a file using stream classes. (08 Marks)
With an example
i) Explain the syntax for opening and closing of file operations,
ii) Explain End of file (EOF) operator (08 Marks)
For More Question Papers Visit - www.pediawikiblog.com