PREVIOUS YEAR QUESTION PAPER

CS8203 – Programming using C++

Anna University

Regulation 2012 Semester 2 2019

Question Paper Details

University Anna University
Degree B.E. Computer Science and Engineering
Department Computer Science and Engineering
Regulation Regulation 2012
Semester 2
Subject Code CS8203
Subject Name Programming using C++
Exam Session April / May 2019
Duration 3 Hours
Maximum Marks 100

View Question Paper PDF

Access the previous year question paper for your examination preparation.

View / Download PDF

How to Use This Question Paper

More Question Papers

Browse other previous year question papers for this subject.

View All Subject Question Papers

Question Paper Intelligence

Automatically extracted historical question data. Academic accuracy and examination rules require verification.

9Extracted entries
100Maximum marks (metadata)
180Duration (minutes)
4Choice candidates

Part-wise extracted questions

Part B9

Question type candidates

Other Or Unclassified9

Section marks — arithmetic candidates

Part A20 marks
Part B80 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B51680

Estimated time allocation

Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.

Section time budget

Part A36.0 min
Part B144.0 min

Optional-choice evidence

Detected alternatives only. Confirm the actual choice rules in the original question paper.

Part B — Question 12: Option a · Option b
Part B — Question 13: Option a · Option b
Part B — Question 14: Option a · Option b
Part B — Question 15: Option a · Option b

Question navigator

Extracted questions

Part B — 11

Answer the following . A. Copy constructor and Dynamic constructor. (4) B. List those operators that can be and cannot be overloaded in C++. (4) C. "Only destructors can be made virtual". Justify your answer. (2) D. When will you make a function Inline. Write an inline function to find the maximum of three numbers. (4) E. Is there any way to access class private members without its object? J ustify your answer. (2)

Other Or Unclassified

Source quality review required

Part B — 12a

a) i) Write a program that demonstrates the use of static data member, static member function and array of objects. (10) ii) What is an array of pointers ? And how does it differ from pointer to an array? Illustrate with an example. (6)

Other Or Unclassified

Source quality review required

Part B — 12b

b) 1) Write a C program to calculate the net salary of an employee with structure members as Name, Empid, Basic pay, Da(10% of Basic pay), Ta(12% of Basic pay). Create a pointer pointing to an array of 10 employees. Write a display function to display the details of employee who is getting the highest salary based on their annual income using pointers. Also write an update function to modify the annual income by deducting IT( use structure pointer as function argument). (10) 11) Write a C program to store 5 names in a text file. Display the same. Append 2 names and display the byte position of 6th name. (6)

Other Or Unclassified

Source quality review required

Part B — 13a

a) 1) Create a base class named, 'shape' with two members base and height, a member function for initialization and a virtual function to compute area(). Derive two specific classes Triangle and Rectangle which override the function area(). Use these classes in main function and display the area of triangle and rectangle using virtual functions. (12) ii) Brief about Abstract base class and Virtual base class with suitable syntax. (4)

Other Or Unclassified

Source quality review required

Part B — 13b

b) Write a program that has a class Train with data members- no of 50218 1”, no of seats 2", no_of seats 3" and member functions to set and display data. Derive a class Reservation that has data members- seats booked_1*, seats ௦01602”, seats booked_31""- and functions to book and cancel tickets, and display the status. (16)

Other Or Unclassified

Source quality review required

Part B — 14a

a) i) List out the advantages of class and function templates. (4) 11) Write a generic function to perform linear search on an array (12)

Other Or Unclassified

Source quality review required

Part B — 14b

b) Write a program that has a class Matrix, overload the += operator, and throws an exception if number of rows and columns of the two matrices are not equal. (16)

Other Or Unclassified

Source quality review required

Part B — 15a

a) i) Write a program that reads a file and copies its contents in another file. While copying, replace all full stops with commas. (8) 11) Write a program to reads a file that contains integers. Read the integers and categorize them as even or odd. Store all even integers in a file called EVEN.TXT and all odd numbers in ODD.TXT (8)

Other Or Unclassified

Source quality review required

Part B — 15b

b)i) Write a program that demonstrates the use of different cast operators. ii) Write a program to implement Vectors in STL which includes the following operations. - push_back( ) - pop_back( ) - begin( ) - end( ) (8)

Other Or Unclassified

Source quality review required

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.