This download link is referred from the post: PTU MBA 4th Semester Last 10 Years 2011-2021 Previous Question Papers|| Punjab Technical University
Roll No.
Total No. of Questions : 15
Total No. of Pages : 03
--- Content provided by FirstRanker.com ---
MBA (2016 to 2017) (Sem.-4)
PROGRAMMING IN C++
Subject Code : MBA-986
M.Code: 71400
Time: 3 Hrs.
--- Content provided by FirstRanker.com ---
Max. Marks : 60
INSTRUCTION TO CANDIDATES :
- 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.
--- Content provided by FirstRanker.com ---
SECTION-A
Q1. Differentiate between break and continue statement. Give example of each.
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?
--- Content provided by FirstRanker.com ---
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?
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.
--- Content provided by FirstRanker.com ---
b) What is the purpose of the switch statement? How does this statement differ from the other decision making statements?
Q8. Define the terms:
- Data encapsulation
- Data hiding
- Data abstraction
- Inheritance
- Polymorphism
- Objects
- Class
- Member function
--- Content provided by FirstRanker.com ---
--- 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.
Q10. Explain the concept of passing one dimensional, two dimensional arrays through functions with suitable example of each.
UNIT-III
--- Content provided by FirstRanker.com ---
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
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
--- Content provided by FirstRanker.com ---
- Display count of character in file
- Display count of new line in file.
SECTION-C
Q15. Create a class named Student with the following specifications : An instance variable named name to hold a student's name
--- Content provided by FirstRanker.com ---
An instance variable named rollno to hold a student's roll number
An instance variable named scores to hold a student's 5 exam spores.
Avoid input() function that reads 5 integers and saves them to scores
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 .
--- Content provided by FirstRanker.com ---
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 ---
This download link is referred from the post: PTU MBA 4th Semester Last 10 Years 2011-2021 Previous Question Papers|| Punjab Technical University