Roll No. ____________________ Total No. of Pages : 03
Total No. of Questions: 15
MBA (2016 to 2017) (Sem.-4)
--- Content provided by FirstRanker.com ---
PROGRAMMING IN C++
Subject Code: MBA-986
M.Code: 71400
Time: 3 Hrs. Max. Marks : 60
INSTRUCTION TO CANDIDATES :
--- Content provided by FirstRanker.com ---
- SECTION-A contains SIX questions carrying FIVE marks each and students has to attempt any FOUR questions.
- SECTION-B consists of FOUR Subsections: Units-I, II, III & IV. Each Subsection contains TWO questions each carrying EIGHT marks each and student has to attempt any ONE question from each Subsection.
- SECTION-C is COMPULSORY carrying EIGHT marks.
SECTION-A
Q1. Differentiate between break and continue statement. Give example of each.
--- Content provided by FirstRanker.com ---
Q2. Define Pointer with suitable example. Highlight the difference between the pointer and reference variable.
Q3. What is an inline function? Discuss advantages, disadvantages of inline function.
Q4. What is constructor overloading? What is benefit of constructor overloading?
Q5. Describe in brief the role of seekp(), seekg(), tellp(), tellg() in file handling.
Q6 What is virtual function? What is the need of virtual functions?
--- Content provided by FirstRanker.com ---
SECTION-B
UNIT-I
Q7 a) Compare the use of the if - else statement with the use of the ?: operator. In particular, in what way can the ?: operator be used in place of an if - else statement.
b) What is the purpose of the switch statement? How does this statement differ from the other decision making statements?
Q8. Define the terms:
--- Content provided by FirstRanker.com ---
- Data encapsulation
- Data hiding
- Data abstraction
- Inheritance
- Polymorphism
- Objects
- Class
- Member function
--- Content provided by FirstRanker.com ---
UNIT-II
Q9. How is a pointer variable declared? What kind of information is stored by a pointer variable? Differentiate between call by value and call by address with suitable example.
--- Content provided by FirstRanker.com ---
Q10. Explain the concept of passing one dimensional, two dimensional arrays through functions with suitable example of each.
UNIT-III
Q11. Explain the visibility of base class members for the access specifiers: private, protected and public while creating the derived class and also explain the syntax for creating derived class.
Q12 What is the role of constructor and destructor? Write a C++ program to define a suitable parameterized constructor with default values for the class distance with data members feet and inches
UNIT-IV
--- Content provided by FirstRanker.com ---
Q13. Define Function Overloading. Write a C++ program to define three overloaded functions to swap two integers, swap two floats and swap two doubles.
Q14. Define the term file. Write a C++ program to read text file and perform following operation
- Display count of character in file
- Display count of new line in file.
SECTION-C
--- Content provided by FirstRanker.com ---
Q15. Create a class named Student with the following specifications :
An instance variable named name to hold a student's name
An instance variable named rollno to hold a student's roll number
An instance variable named scores to hold a student's 5 exam scores.
Avoid input() function that reads 5 integers and saves them to scores
--- Content provided by FirstRanker.com ---
An int calculateTotalScore() function that returns the sum of the student's scores.
A void search() function to search a student record based on name and print its record i.e name, rollno, scores .
Inside main() function create array of objects and call all functions to simulate the program
(Note : take necessary assumptions where required)
NOTE : Disclosure of Identity by writing Mobile No. or Making of passing request on any page of Answer Sheet will lead to UMC against the Student.
--- Content provided by FirstRanker.com ---
For more previous year question papers, visit: FirstRanker.com
This download link is referred from the post: PTU MBA 2020 March Previous Question Papers
--- Content provided by FirstRanker.com ---