1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nika2105 [10]
3 years ago
10

To guarantee that the member variables of a class are initialized, you use ____.

Computers and Technology
1 answer:
Leya [2.2K]3 years ago
8 0
A constructor, member initialization lists and also the default member initializer. Here you see all three (in reality you choose one construct per variable).

class A
{
  public:
    int x = 0;

   A() : x(1)
   {
      x = 2;
   }
};
You might be interested in
Edhesive 6.8 lesson practice answers
FromTheMoon [43]

Answer:

1.) 25 ; 15 ; 15

2.) 50 ; 15 ; 50

Explanation:

In the first function written :

The variable val was initially decaled or assigned a value of 25 and that was what was printed first.

However, after the example function was written, the val variable was finally assiagned a value of 15 within the function. However, it was also declared that the global variable takes uonthe val value. Hence, the val variable initially assigned a value, of 25 changes to 15 globally.

For the second code :

From the top:

Val was assigned a value of 50 ;

Hence,

print(val) gives an output of 50

Within the function definition which prints the value of val that is assigned a value of 25 within the function.

Since tbe global variable isnt reset.

Printing Val again outputs 50;since ito is outside the function.

6 0
2 years ago
Select the correct answer from each drop-down menu.
xz_007 [3.2K]

Answer:

Maths operators

cell reference

5 0
3 years ago
Which Save As element allows a user to save a presentation on a computer?
mrs_skeptik [129]

Answer:

Option D, This PC allows a user to save a presentation on a computer

Explanation:

If one choses the option C, the file will be saved in the folder in which the user is working. Hence, option C is incorrect.

Like wise option A is also incorrect as it will require user to provide a location as option for saving the file

Option B is also incorrect as it will allow the user to save files in the C drive/D drive or one drive

Option D is correct because if the user choses this option file will be saved on the computer.

Hence option D is correct

7 0
3 years ago
Which one cost more Broken bones or a Broken Computer? Explian ur answer
vladimir1956 [14]
Broken bones cost more, because hospital bills are a lot more than to get a computer fixed.
4 0
3 years ago
Read 2 more answers
When 2 or more computers are connected it is called?
Alenkasestr [34]

When two or more computers are connected it is called Local Area Network (LAN).

5 0
3 years ago
Other questions:
  • What type of user account should Tuan’s brother use?
    10·1 answer
  • Henry has to create software that manages a database of all his clients of his firm. He wishes to run software on another comput
    10·2 answers
  • Are commonly used to control the number of times that a loop iterates?
    5·1 answer
  • What task did the u.s. government undertake that many people identify as the birth of the internet
    5·2 answers
  • Computer a sends a packet intended to reach computer f. along its path it arrives at computer
    15·1 answer
  • A file to which information is written is referred to as a(n) ____ file.
    8·1 answer
  • When is e-mail an appropriate channel for goodwill messages? If you frequently communicate with the receiver by e-mail and are c
    15·1 answer
  • Which word processing file that contains text and other
    13·2 answers
  • Name three types of hard drives, along with its speed and size.
    8·1 answer
  • When a derived class method has the same name as a base class method, it is often said that the derived class method ________ th
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!