What is the best answer for this quiz. Q.1 Which of the following is a disadvant
ID: 3906615 • Letter: W
Question
What is the best answer for this quiz.
Q.1
Which of the following is a disadvantage of using typedef?
Without looking directly at the typedef statement, it is not obvious what type is actually being used.
It permanently locks the size of a data structure so it cannot be expanded.
It requires additional definitions and declarations in order to use it.
It produces variables and objects whose values are not easily modified.
Q.2
How does a sequence differ from a bag?
A sequence is dynamic and a bag is static.
A sequence allows duplicate values and a bag does not.
A sequence is ordered and a bag is unordered.
A sequence cannot be indexed like a bag can.
Q.3
If we had a class named MapData, how would we declare its destructor?
~MapData();
NULL_PTR this->MapData();
destructor* MapDataDestructor();
delete[] MapData();
Q.4
If we declare char c, how would we make a pointer point to it?
char *p = p->c;
char p = *c;
char *p = &c;
pointer p = pointerTo(c);
Q.5
The main idea behind object orientation is that ____.
we manage the development process as a series of iterations
we build software systems using only pre-existing components like libraries and frameworks
we view a problem as a set of objects that have attributes and behaviors
we build applications by first assembling user interface objects before writing code
Q.6
When used to declare a class member, what does static mean?
Its value cannot be changed.
It is shared by all objects of the class and can be accessed directly through the class name.
It cannot be overloaded.
Its size in memory is fixed.
Q 7
What is a memory leak?
When a local variable is declared but never used.
When memory is allocated but never released back to the system.
When an unnecesssary parameter is passed to a member function.
When an invalid array index references memory outside of the array's bounds.
Q. 8
The use of object-oriented concepts to help us understand a problem is called ____.
Object Oriented Analysis (OOA)
Object Oriented Database Management System (OODBMS)
Object Oriented Design (OOD)
Object Oriented Programming (OOP)
Q. 9
What are the main advantage and disadvantage of inline member functions?
They execute more efficiently but lead to larger memory consumption.
They have broader visibility to other objects but increase the risk of receiving invalid values.
They are easier to reuse but more difficult to write.
They compile faster but are difficult to debug.
Q. 10
In object-oriented terms, a container is:
a static data structure.
a mechanism for preventing the propagation of errors through a system.
an object that contains a collection of items.
an environment in which an application runs.
Thank you,
Explanation / Answer
Q1
Without looking directly at the typedef statement, it is not obvious what type is actually being used.
Q2
A sequence is ordered and a bag is unordered.
Q3
~MapData();
Q4
char *p = &c;
Q5
we view a problem as a set of objects that have attributes and behaviors
Q6
It is shared by all objects of the class and can be accessed directly through the class name.
Q7
When memory is allocated but never released back to the system.
Q8
Object Oriented Analysis (OOA)
Q9
They execute more efficiently but lead to larger memory consumption.
Q10
an object that contains a collection of items.
Do give a thumbs up
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.