![]() |
|
#1
|
||||
|
||||
|
Question No: 5 ( Marks: 1 ) - Please choose one
A static member function cannot be declared. ► Static ► Implicit ► Explicit ► Virtual Question No: 11 ( Marks: 1 ) - Please choose one Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 - obj2 to work correctly, if the overloaded - operator must ► take two arguments. ► return a value. ► create a named temporary object. ► take four arguments Question No: 12 ( Marks: 1 ) - Please choose one Which operator can not be overloaded? ► The relation operator ( >= ) ► Assignment operator ( = ) ► Script operator ( [] ) wrong answer ► Conditional operator (? : ) Correct answer. See handout’s page # 141 Question No: 21 ( Marks: 3 ) Explain what type of copy the default assignment operator "=" does when applied to objects. (shallow copy or deep copy) Question: How we can use the concept of overloading to convert a type according to our own requirements? Give one example. Question: The members of a class that can be accessed without creating the object of the class is called Question: Differentiate between Simple association and Aggregation? Question: Friend function minimizes “Encapsulation”. Describe in your own wordings? Question: program about constant member function. See page # 100 Question: can binary operators overloaded, how can they overload give an example for any one operator. CS304 -- Fall 2010 Papers (Latest) Paper # 01 1) Explain what type of copy the default assignment operator "=" does when applied to objects. (shallow copy or deep copy) 2) How we can use the concept of overloading to convert a type according to our own requirements? Give one example. 3) Give the name of two cases where you MUST use initialization list as opposed to assignment in constructors. 4) Can we create an array of objects for a class having user defined constructor? Justify your answer. 5) Fill in the blanks below with public, protected or private keyword. Public members of base class are __________ members of derived class Protected members of base class are __________members of derived class. 6) What is simple association? Explain it with the help of an example. 7) The members of a class that can be accessed without creating the object of the class is called. 8) The >= operator can be overloaded. 9) Which of the following operators can not be overloaded? The relation operator ( > ) (>>) () (:J Today 05-12-2010 My CS304 paper. Q:1 Explain what type of copy the default assignment operator "=" does when applied to objects. (shallow copy or deep copy) Q:2 How we can use the concept of overloading to convert a type according to our own requirements? Give one example. Q:3 Give the name of two cases where you MUST use initialization list as opposed to assignment in constructors. Q:4 Can we create an array of objects for a class having user defined constructor? Justify your answer. Q:5 Fill in the blanks below with public, protected or private keyword. Public members of base class are __________ members of derived class Protected members of base class are __________members of derived class. Q:6 What is simple association? Explain it with the help of an example. Q:7 The members of a class that can be accessed without creating the object of the class is called Q: 8 The >= operator can be overloaded. Q:9 Which of the following operators can not be overloaded? The relation operator ( > ) (>>) () (: Q:10 A static member function cannot have access to the _____ pointer of the class. dangling this refrence null |
![]() |
















Linear Mode


