Quiz
OOP
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (41)
1Which of the following types is a structured data types in C++?
- Afloating
- Bshort
- Carray
- Dpointer
2Which of the following types is not a structured data types in C++?
- Aenum
- Bstruct
- Carray
- Dclass
3Which of the following types is not a structured data types in C++?
- Aenum
- Bstruct
- Carray
- Dclass
4Which of the following to avoid such name collisions, programmers to use unique identifiers in their own code types is a structured data types in C++?
- Anamespaces
- Breferences
- Cconstants
- Dpointer
5Which of the following value represented unsigned integer in C++?
- A2344U
- B166UL
- C3.1416F
6Which of the following operations is wrong based on this code: int var1=333, var2=444; *pvar1, *pvar2;
- Apvar2 = &var2
- Bpvar1 = var1
- C*pvar1 = var2
- D*pvar2 = *pvar1 + 100
7Which of the following correct form of defining structure?
- Astruct AnimalType {long id; string name;};
- Bstruct AnimalType {long id, string name;};
- Cstruct AnimalType {long id, string name}
- Dstruct AnimalType {long id; string name;}
8Which of the following correct form of defining structure?
- Astruct AnimalType {long id; string name;};
- Bstruct AnimalType {long id, string name;};
- Cstruct AnimalType {long id, string name}
- Dstruct AnimalType {long id; string name;}
9How many class member has the following class?
: class AnimalType {public: long id; string name; public: void hello();};- A1
- B2
- C3
- D4
10Which of the following function can be a constructor for class student()
- Astudent()
- Bsetdata()
- Cconstructor()
- Dinitialize()
11Which of the following is a special member function of a class that is executed whenever an object of it’s class goes out of scope or whenever the delete expression is applied to a pointer to the object of that class?
- Adestructor
- Bconstructor
- Cpublic function
- Dprivate function
12Which of the following is wrong about dot operator “.” In C++?
- A“dot” operator used to open up enough space in memory
- B“dot” operator used for non-pointers
- C“dot” operator used to get to an instances attributes
- D“dot” operator used to Get to an instances methods
13Which of the following is operator used for accessing an instances attributes or methods for pointer object?
- A“->”
- B“.”
- C“~”
- D“&”
14Which of the following is correct way of defining inheritance in C++ (when Student class is inherited from Person)?
- Aclass Student : public Person{}
- Bclass Student (public Person){}
- Cclass Student : superclass Person){}
- Dclass Student extends public Person{}
15Which of the following is correct about Overriding methods?
- AWriting several functions with different names
- BWriting several functions with same names but different type of inputs
- CRedefining the methods to give new functionality to the class
- DAll of the above
16Which of the following inheritance hierarchy whenever subclasses inherit from one have class?
- AMultiple Inheritance
- BHierarchical Inheritance
- CHybrid Inheritance
- DMultilevel Inheritance
- ESingle Inheritance
17Which of the A function in the derived class with the same function name will rewrite the function’s variables in the base class?
- ARewritten function
- BOverload function
- CNone of the above
- DOverride function
18In the inherited class , which of the following class lets the compiler decide which function and which variable should be accessed from parent class
- ATemplate class
- BVirtual class
- CInterface class
- DAbstract class
19Which of the following variable type make access to its data members from outside the class is restricted to read-only?
- APrivate variables
- BConst variables
- CStatic variables
- DPublic variables
20Which of the following type of class members is Accessible to inherited classes only?
- Apublic
- Bprivate
- Cstatic
- Dprotected
21Which of the following made it is possible for different objects to respond to the same message in different ways
- APolymorphism
- BAbstraction
- CEncapsulation
- DInheritance
22Which of the following made it is possible allows code and data to be packaged together (The idea is that if the inputs and outputs of an object are fully specified, the way that it is accomplished does not need to be visible)
- AEncapsulation
- BAbstraction
- CInheritance
- DPolymorphism
23Which of the following describing two methods or constructors if they have different numbers of parameters or the same number of parameters for different types?
- AOverwriting
- BOverloading
- COverriding
24Which of the following is not correct about UML?
- AUML stands for “Unified Modeling Language”
- BUML is dependent on one specific programming language
- CThe UML uses mostly graphical notations to express the OO analysis and design of software projects
- DSimplifies the complex process of software design
25Which of the following is to model set of scenarios that describing an interaction between a user and a system or software?
- AClass Diagram
- BActivity Diagram
- CUse Case Diagram
- DSequence Diagram
26Which of the following is a symbol of public attributes in UML class diagram?
- A-
- B#
- C+
- D/
27Which of the following is a kind of relationship in UML connects a subclass to its superclass?
- ADependencies
- BGeneralizations
- CAssociations
- DAll of the above
28Which of the following is a kind of relationship in UML is used to show strong ownership and of parts by the whole or other part?
- AGeneralizations
- BDependencies
- CAll of the above
- DCompositions
29Which of the following is collection of data elements in an array structure. From any given element in the array, the previous and next items can be obtained by moving to adjacent memory locations?
- AList
- BStructure
- CClass
- DLinked list
30Which of the following is an essential part of a linked list class?
- AAddress of last node
- BAddress of first node
- CAddress of all nodes
- DNone of the above
31Which of the following is a type-independent patterns that can work with multiple data types?
- ATemplate class
- BVirtual class
- CAbstract class
- DStatic class
32Which of the following is not correct about multiply function in the following code:
Template<class A_Type>class calc {A_Type multiply(int x, int y);}:?- AAll of the above
- BMultiply function get two integer values (as input)
- C“class calc” is a template class
- DMultiply function return integer value (as output)
33Which of the following is used to instantiate a pointer and set it to reference one or more methods to be called when we invoke the pointer?
- ADelegate
- BTypedef
- CConstant
- DTemplate
34Which of the following is A in the following code:
Void main(){void (*pf)(int i); pf=A;};?- AA should be function
- BA should be a variable
- CA should be a class
- DA should be a template
35Which of the following is a piece of executable code that is passed as an argument to other code?
- ATypedef
- BTemplate
- CCallback
- DDelegate
36Which of the following is defined by pairing together of data and actions into a model of a real world object?
- ADisturbuted Programming
- BEvent driven Programming
- CObject Oriented Programming
- DCloud Programming
37Which of the following is correct about event-driven programming?
- AEvent driven programming waiting for an input command
- BEvent driven programming is a style of programming in which we have a server
- CMost event driven languages are object oriented
- DAll of the above
38Which of the following is a function which must be overridden by any concrete (i.e., non-abstract) derived class?
- ATemplate function
- BConstructor function
- CDeligate function
- DPure virtual function
39Which of the following type of classes cannot be instantiated, but they can be subclassed?
- AConcrete class
- BTemplate class
- CAbstract class
- DAll of the above
40Which of the following type is a completely abstract class?
- AAll of the above
- BConcrete class
- CTemplate class
- DInterface class
41Which of the following variables type is only one common variable for all the objects of that same class and sharing the same value?
- APublic variables
- BPrivate variables
- CConst variables
- DStatic variables
Information
- Description
- Quiz on OOP , created by 1610 R on 09/12/2017.
- Author
- 1610 R
- Language
- English
- Views
- 34
- Rating
- No ratings yet Rate this quiz