CS304 Solved Grand Quiz Spring 2021

Dear Students in this post we are providing you CS304 Solved Grand Quiz Spring 2021. We have provided all Past CS304 Grand Quiz with 100% correct Solution. You can also visit our website vulmshelp.com for the solution of CS101 Mid Term past paper and Final Term Past paper.

CS304 Solved Grand Quiz Spring 2021

CS304 Solved MCQs

SR NOMCQS QUESTIONANSWER
1In expression c1*c2+c3-c4 which of the following will be executed in first orderC1*c2
2Inheritance is a way toAdd features to existing classes without rewriting them
3————— represent “IS A ”relationshipInheritance
4Constructor without any parameter is called:Default constructor
5Which of the following stores the address of a variable?Pointer
6A Post-fix unary operator is implemented in C ++ using Member function with1 dummy int argument
7minimum classes required in a program for implementing multiple inheritance3
8Which of the following statement(s) describe constant member functions?All of the given option
9composition is a strong relation relationship becauseComposed object cant exist independency
10How many interactions are there in the following scenario Imran has the car. he drive the car and car has four wheels and doors3
11if we extend our model ,and the rest of the model is not affected then it is called——Flexibility
12choose correct declaration of overload*=1 operator for class complex as Member functionComplex and operator*=(const complex & c)
13Consider the following class A{int a,b,c; public: A():B(10),C(0)a(7) };A,b,c
14Class is a blue print ofObjects
15Suppose we have a class student which of the following statement is correctly declaring the pointer to the object of student class?Student*object
16In c++ composition is relationship between ——-and——objectsWhole, part
17Which of the following Depicts the proper definition of class?a class is description of a kind of object
18in class attributes are represented by —-and—— respectivelydata member, Member function
19which of the following represents the two AssociationEmployee works for the company
20Entities in OO model are represented byRectangle
21Which of the following features of OOP is used to derive a class from another?Inheritance
22In C ++ which of the following is defined as a stream insertion operator?<< 
23choose the correct declaration of overloaded equality (==)operator for class string as a Member functionBool operator==(const string and s)
24—- is the relationship between the part object and the whole objectComposition
25object hides its information from others this concept is known asinformation hiding
26the concept of derived classes is involved inInheritance
27abstraction provides information according touser perspective
28which of the following is not an object AssociationInheritance
29which of the following classes are used by amphibious vehicle to inherit characteristicsboth land and water vehicle
29object data includesboth states and attributes of an object
30choose correct declaration of overloaded inequality operator for class string as non member friend functionfriend pool operator !=(const string &s1,const string &2)
31How many objects of a given class may be constructed in an application?as many as the application ask for
32how many objects of a given class may be constructed in an applicationas many as the application ask for
33Which of the following statements describe constant member functions?all of the given option
34student *ptr=new student(” Ali”); is an example ofstatic memory allocation
35in——- base class can be replaced by the derived classextension
36Which of the following is a correct way of declaring constant variable ROLLNO?cosnst int Roll no;
37which of the following operator doesn’t take argument hit overloadednone of the given choices
38which of the following is part of the Class diagramall of the given option
39a child inherits characteristic from itsparent
40which of the following issues can be caused by the use of friend functionprogramming Bugs
41which of the following is not true about constant number functionall of the given option
42Which one is not the main features of object oriented programming?exception handling
43  
44in object oriented programming, objects communicate with each other throughmessages
45static data member is declaredinside the class
46the concept of derived classes is involved ininheritance
47Which of the following can we attribute of an object “Ali”?address
48Which of the following keyword tell the compiler to substitute the code within the function definition for every instance of a function call?inline
49inheritance is the relationship betweenclasses
50how many objects are involved in the binary Association2
51all objects of same class has ——–attributessame
52which of the following concept is more close to encapsulationinformation hiding
53member initialization list is used toinitialize data member
54aggregation between objects show thatobjects have week relationship
55there is /are ways to create user defined types for objects in C ++two
56composition is a strong relationship because:composed object can not exist independently
57in polymorphism messenger can be interpreted in different ways depending upon the—– classreceiver
58which of the following is most suitable advantage of information hidingsimplifies the model
59the process of extracting common characteristics from two or More classes and combining them into a generalized superclass is calledGeneralization
60——- operator is used to create objects at run timenew
61choose the correct option to declare an overloaded Stream insertion operator for userdefind class “string” as a non-member friend functionfriend out stream and operator<<(ostream and os,const string & s)
62static data member is declaredinside the class
63an instance of user defined type is calledobject
64which of the following is true about constructorall of the given option
65Which of the following correct way of declaring constant variable ROLLNO?const int ROLLNO;
66inheritance is shown byfilled arrow
67which of the following operators operate on one operandunary operator
68which of the following will happen when a constant function tried to change the value of data members of the classcompile time error will occur
69in object oriented programming, objects communicate with each other through—messages
70How the information hidden within an object can be accessed?through its interface
71object orientation approach can be achieved using object and their——-interactions
72constructors have —– return typeno
73which of the following is an example of unary operatorincrement operator(++)
74memory is allocated to non-static members only whenobject is created
75in class B inherit from class A which of the following is child classclass B
76the—— tells the compiler what task the function will be performingfunction definition
77Consider the statement” room has chair” which of the following type of Association exists between whom and chair?aggregation
78how many objects are involved in the N-ary Associationmore than 3
79deconstruct is a function which has the same name as that of class but starts with a—– sign~
80which of the following is a tangible entitycar
81member initializer list is used toinitialize data members
82we can get the address of variable stored in pointer using—–& symbol
83two sentence object oriented programming book in bookshelf is an example ofaggregation
84which of the following best defines the obstructionhide the implementation and show current perspective
85which of the following define default constructor 5 class studentstudent(){//..}
86object data includesboth state and attributes of an object
87minimum classes required in a program for implementing multiple inheritance3
88information hiding can be achieved through——-encapsulation, abstraction
89compiler generated defaulter structure is called—– hand user written default constructor is called—-implicit, explicit
90which of the following is true about constructorall of the given option
91In which of the following different forms office single entity exist?polymorphism
92data members of a class student can be:all of the given option
93the—– turn off the compiler what does the function will be performingfunction definition
94Suppose a class does not have any constructor what will happen when an object of this class is created?compiler will call implicit default constructor
95how can we differentiate between constructor and destructordestructor are preceded with a Tilda(~) symbol, and constructor are not preceded with any symbol
96—- is used for hiding the details of an object from the other parts of a programencapsulation
97Class diagram includeclass name, attributes, operation
98through interface was access objects——–behavior
99composition is a strong relationship becausecompose object cannot exist independently
100copy constructor is called when:an object is created in term of Preexisting object
101choose the correct option to declare an overloaded stream insertion operator for a user defined class string as a non-Member friend functionfriend ostream & operator(ostream &os.const string &s)
102a post-fix unary operator implemented in C plus plus using non Member function with—- argumentstwo
103in class attributes and behaviors are represented by—- and— respectivelydata members, member functions
104which of the following best describes the relationship between book and book chapter classescomposition  
105which of the following is true about destructorall of the given option
106in composition—– are called from composing objects to composed subjectsdestructors
107which of the following can be used an alternative to Static membersGlobal variables
108which of the following statement is true about static function of a classit is used to access static data members
109which of the following operator does not take any arguments if overloadednone of the given choices
110what is the output of the following code int main(){int cost x=10;cout<<++x;return0;}error
111abstraction includes——-relevant information
112Which of the following can be the behavior of an object “Usman”?eat
113a class defined within another class isnested class
114when an object is initialized, is automatically called by the compilerconstructor
115the compiler treats the Member function of a class asinline function
116an object has attributes operation ,and——-unique identity
117Which of the following is not an access specifier in C ++?hidden
118which of the following parts of an object exhibits its statedata
119—- is the relationship between the part object and the whole objectcomposition
120how can we identify classes from a given problem statementby extracting nouns from problem statement
121what “friend” should be placed infunction declaration
122generalization is——– approachbottom-up
123static data members can be accessed through——–dot operator and scope resolution operator
124composition age—– and aggregation is——- relationshipstrong, weak
125suppose there is an object of type person, which of the following can be considered as one of its attributesname
126Which of the following depicts the proper definition of class?a class is a description of a kind of object
127a child inherits characteristics from its——-parent
128the car is composed of wheels what is the relationship between car and wheels?composition
129—— is creating objects of one class inside another classcomposition
130the other name of specialization is——-restriction
131suppose a is an int type static data member class test then which of the following is correct way of initialization the static variable outside the class testint test::a=0
132Which of the following stores the address of variable?Pointer
133  
134  
135static data member is declaredinside the class
136polymorphism makes the systemall of the given option
137which of the following statement best describes the constructorconstructor is used to initialize the data members of a class
138data member(s) of a class student can beall of the given option
139which of the following is a strong relationshipcomposition
140all objects of same class has——- attributessame
141in C ++ composition is a relationship between—-and—- objectswhole, part
142suppose 12 class string assignment operator is overloaded with following declaration void operator=(const string &); what will happen when we will write following statement in main() str=str2=str3;where,str1.str2,str3 are object of class string  compiler will generate compile time error
143in class B inherits from class A then it contains all characteristics of—-class A
144which of the following is not an example of multiple inheritancecar
145which of the following can be created without any object of a class?static data members
146consider the following code segment class test{int a;int b;int c;}junk value,5, junk value
147object orientation approach can be achieved using objects and their—–interactions
148member functions defined inside a class declaration are——- by defaultprivate
149how can we identify classes from a given problem statementby extracting nouns from problem statement
150which of the following statement is not true about static variable of a class?static variable belongs to particular instance of a class
151there are—— types of constructor in C++3
152statement yasir is a friend of Ali and Ali is a friend of yasir is an example oftwo way Association
153this pointer cannot be passed implicitly to——– functionsstatic member
154which of the following issues can be caused by the use of friend functionall of the given
155in—— send a message does not need to know exact class of the receivernone of the given option
156minimum classes required in a program for implementing multiple inheritance3
157——-Associates the object of the exact two classesbinary Association
158main characteristics of information hiding iskeep the model simple
159static data member is declaredinside the class
160in expression b=c/d, the arity of division(/) operator is2
161we can allocate dynamic memory in C ++ through operatornew
162Which of the following is true about accessor functions?all of the given option
163in—- base class cannot always be replaced by the derived classspecialization
164abstraction help toreduce the complexity
165relationship in which child object gets destroyed if parent object is destroyedcomposition
166object oriented programming is better than procedural programming because:it is more close to reality
167The derived class inherits behavior from the base class and also exhibits its own behavior. this concept is known as—Overriding
168the other name of subtyping isExtension
169A good model is—— related to life problemclosely
170in generalization general class represents the ——– behavior of the classcommon
171how can we identify from a given problem statement?by extracting noun from problem statement
172which of the following is not a access specifier in C ++hidden
173in composition—— are called from composing objects to composed objectsdestructors
174a class have only—- destructorone
175suppose you have following C + + statement int old value=10; int new value=++old value; what will be the value of old value and newValue after executing above statements ?oldVlue=11,newVlue=11
176in constant Member function the type of this pointer isconstant pointer to constant data
177—– is creating objects of one class inside another classcomposition
178——– Associates the objects of the exact three classesternary Association
179generalization is implemented throughinheritance
180which of the following is strong relationshipcomposition
181composition is a strong relationship becausecomposed object cannot exist independently
182—– is set of function of an object exposed of other objectsinterface
183suppose student is a class, which of the following defines constructor with one parameter for class studentstudent(char*aName);
184which of the following is not true about constant Member functionall of the given option
185—– define the order of evaluation of an operator is an expressionoperator precedence
186choose correct declaration of overloaded inequality(!=) operator for class string as non member friend functionfriend bool operator!=(const string &s1,cont string &s2)
187which of the following is most suitable advantage of information hidingsimplifies the model
188a fan has wings, which type of relation exists between fan and Wings in this sentencecomposition
189multiple inheritance is implemented between class through—— symbolcomma(,)
190postfix unary operator is implemented in C ++ using non Member function with argumentstwo
191Supposed derived class is inherited from base class what happens when a derived class object is createdthe constructor of base class exact is executed before the constructor of derived class
192assignment operator areright associative
193a postfix unary operator is implemented in C ++ using number function with1 dummy int argument
194which of the following is true about exception functionsall of the given option

As you know virtual university taking midterm or grand quiz exams. Students are searching past grand quiz files of their subjects. Here we provide you vu grand quiz 2021 files. Easy to Download your midterm papers according to your subject

JOIN OUR WHATSAPP GROUP

AL-JUNAID INSTITUTE GROUP

Download link of CS304 Grand Quiz Solved File

We are here to provide Latest Virtual University assignment  Solutions, GDB Solutions, Quiz Solution, Midterm Past Papers, and Final term Past Papers in this website.

Leave a Comment