Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


CS304 Current MIDTerm Papers Fall 2012 Date: 08-December-2012 to 19-December-2012

Views: 3312

Replies to This Discussion

Please Share your Current Papers Questions/Pattern here to help each other. Thanks

 

cs304 MID (08 Dec 2012) 11am paper

Q. Write 2 plus plus code to overload subscript[] operator for string class. (5 marks)
Q.Suppose we have a base class vehicle and a derived van.describe the accessibility of public, protected and private members of base class. “vehicle” in derived class “van ” in case of public inheritance. (3 marks)
Q.Can we create an array of objects for a class having default constructor? Justify your ans. (2 marks)
Q. differentiate between overloaded ++ operator in prefix and post-fix. (2 marks)

th

PariFozu thanks for sharing your paper to help other fellows 

Note to All: You don’t need to go any other site for current Mid Term papers fall 2012, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

thanks dear 

Timing : 9am 08-12-2012
MCQ are mostly from past papers. 20 marks

  1. List of two operators that can’t be overloaded? (2 marks)
  2. Consider the following cal of an overloaded “+” operator. (2 marks)


Rational_number1+ Rational_number2;
Identify which object will be passed as an argument to the overloaded function. Justify your answer with at least 1 solid reason?

  1. Consider the following scenario: (3 marks)


A class X does not have any overloaded operator and has a member function “Subtract” to subtract two objects of X, and then placing the result in third object.
Where third is a calling object.


  1. Consider the following diagram. (5 marks)



Study program

Code
[IMG]file:///C:\Users\Ahmed\AppData\Local\Temp\msohtmlclip1\01\ clip_image001.gif[/IMG]title
Select
List courses
View
Read
Course

Code
title
[IMG]file:///C:\Users\Ahmed\AppData\Local\Temp\msohtmlclip1\01\ clip_image002.gif[/IMG]Add
Select
View
Read



What type of relationship exist 
Implemented data members and member function in C++ with appropriate data types.
Implement the relationship between classes in C++.


  1. Ik function ta string ka (3 marks)




  1. Ik istara ka question ta k Relationships define karna ta in which women is a derived class and lady doctor is a base class. List banana the. (5 marks)

tnx

my today's paper....

20 objectives n 6 subjective.......

1.this pointer are not accessible for ___________.

2.A generalization-specialization relation between classes are implemented using
 ►data hiding
 ►friend classes
 ►encapsulation
 ►inheritance

3.A class can be identified from a statement by __________.

4.the member of the class that can be accessed and work as interface _______.

5.A class can be identified from a statement by -------------
 ►Noun (Page 58)
 ►Pronoun
 ►Verb
 ►Adverb

6.Which one is not keyword in C++?

► operator
► B_op ► const ► None of given

sujective:

when static member of the class are initialized?justify your answer.(2)

write two different ways to overload the post increment operator?(2)

how can we overload stream extraction and insertion operator?(3)

1 class was given don't remember ,question was where the +,-,* are overloaded and these are from left to right.(3)

what are accessor function ? explain with example(5)

write c++ code to overload subscript[] operator for string class.(5)

sarah awan thanks for sharing 

Note to All: You don’t need to go any other site for current Mid Term papers fall 2012, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

my today's paper

Attachments:

Sadia Malik thanks for sharing 

Note for All Members: You don’t need to go any other site for current Mid Term papers fall 2012, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

1. Friend functions increase ‘Programming bugs’. What is your opinion?

2. What is difference between simple association and composition?

3. Consider the following code segment:

 

class Complex {

private:

double real, img;

public:

…..

};

 

Overload the division operator “/” for “Complex” class, when division operator is a member function of “Complex” class.

4. Consider the following code segment:

 

class Complex{

private:

double real, img;

public:

 

// declaration of overloaded subtraction operator

 

// declaration of overloaded multiplication operator

 

};

 

 

// Implementation of overloaded subtraction operator

 

// Implementation of overloaded multiplication operator

 

5. Give the declarations and implementations of each overloaded operator.

 

6. “Data member variables” are the most important part of the program that needs to be

Suppose we have a Base class Woman and a Derived class Lady Doctor

7. Describe the case in which we can use derived class “Lady Doctor” Member Initialization List to initialize the base class “Woman” data members. Give a practical example.

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service