0% found this document useful (0 votes)
11 views7 pages

2024 Object Oriented Programming With C++

This document is a question paper for an Object Oriented Programming with C++ course, containing various sections and questions for students to answer. It includes a compulsory section with coding tasks, output predictions, and class definitions, as well as additional programming challenges related to classes and functions. The paper is structured to assess students' understanding of C++ concepts and their ability to apply them in practical scenarios.

Uploaded by

js1005326
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
11 views7 pages

2024 Object Oriented Programming With C++

This document is a question paper for an Object Oriented Programming with C++ course, containing various sections and questions for students to answer. It includes a compulsory section with coding tasks, output predictions, and class definitions, as well as additional programming challenges related to classes and functions. The paper is structured to assess students' understanding of C++ concepts and their ability to apply them in practical scenarios.

Uploaded by

js1005326
Copyright
© © All Rights Reserved
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/ 7
TA [This question Depot contains 12 printed pages. ] Sr. No. of Question Paper : Unique Paper Code Name of the Paper Name of the Course Semester Duration : 3 Hours (iy Your Roll No...,.......-.-- 4076 H 2342011201 Object Oriented Programming with C++ (DSC-04) B.Sc. (H) Computer Science I Maximum Marks : 90 Instructions for Candidates 1. Write your Roll No. on the top immediately on receipt of this question paper. 2. Section A is compulsory (Question 1). 3. Attempt any 4 questions from Section B (Questions 2 to 6). 4. Parts of a question must be answered together. PPO; 4076 2 Section A (Compulsory Question) 1. (a) Write a code snippet to do the following: (3) * Declare str, a pointer to char and initialized to the value “NITIN”. + Display the ASCII value of each character of the pointer str. (b) What will be the output after executing the following code segments? Assume all the required header files have been included. (3*6=18) @ double sal[]=(3415.5, 6718.8, 7911.5}; double total=0; for (int k=Q; k<3; k++) totalt=sal[k]; cout << "The total salary is" << total; (ii) for (int j=1ij<-4;j5++) { for(int k=1;k<=j;k=k+2) cout<<(j+k); cout<x-=x7 this->y=y; cout<x<y<=500 else the message, “unable to debit, the minimum balance should be 500” is printed, (iv) void deposit (double x) :; This function credits (adds) x to the balance. (v) void display() : This function prints all account details of a given bank account object, Write a main function to create the Bankaccount objects and illustrate the usage of the above functions, (a) Give the output of the following code : (5) class Figure { protected: double area; public : Figure () 9 cout<<"Figure Constructor"; area=07 ? virtual void display()=0; Ve class circle: public Figure { double radius; public: circle(double r) { cout<<"Inside Circle Constructor"<

You might also like