Hello! This is C++. Could you please answer these questions? Thank you and have
ID: 3712312 • Letter: H
Question
Hello! This is C++.
Could you please answer these questions?
Thank you and have a good one!
1. To ____ components is to contain them.
instantiate
abstract
declare
encapsulate
2. A Boolean data type variable can be declared using the ____ data type, which has only two possible values—true or false.
boolean
bool
logical
flag
3. A ____ class member exists, even when you have not instantiated any objects of the class.
public
private
static
const
4. The principle of ____ is a programming principle that says you should give a process only the authority it needs to accomplish its job.
least privilege
abstraction
encapsulation
overloading
5. You can determine the size of a string by using____________
size()
sizeof()
length()
len()
instantiate
abstract
declare
encapsulate
Explanation / Answer
Answer : encapsulate
Encapsulation is considered as a process of wrapping of data and methods.
This data and methods are bind in a single unit.
To implement encapsulation in C++ language, class concept is used.
Example of encapsulation is Medical Capsule like crocine.
In crocine all medicine required for flew are encapsulated in side capsule.
**********************************************************************************************
Answer : bool
In C++ Boolean data type is used for storing Boolean values.
It is also used to store logical values.
It is primitive data type in C++.
If you declare variable of Boolean, it can store either true or false.
bool Keyword used for boolean data type.
************************************************************************************************************
Answer : static
Static members are created when the program starts.
Static members are destroyed when the program ends.
**********************************************************************************************************
Answer : least privilege
It is the principle of least privilege (POLP).
It is an important concept in computer security.
In POLP, users are granted permission.
The permission given are for read, write or execute only the files or resources which they are required to do their jobs.
Very less amount of privileges are granted.
****************************************************************************************************************
5. You can determine the size of a string by using____________.
Answer : size() and length()
string::size: This method returns the length of the string. Length is returned in number of bytes.
string::length: This method also returns the length of the string. Length is returned in number of bytes.
Both string::size and string::length are synonyms of each other.
Both returns the exactly same value.
*****************************************************************************************************************
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.