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
igor_vitrenko [27]
3 years ago
5

What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {

cout << val << endl; } public: TestClass(int x) { val = x; } }; int main() { TestClass test(77); test.showVal(); return 0; }
Computers and Technology
1 answer:
sveticcg [70]3 years ago
5 0

Answer:

The answer to this question is "The program will not compile."

Explanation:

In the given C++ programming language program. The program will not compile because in the program we define a class that is "TestClass" in this class we define a private variable and a function that is val and showVal(). In this function, we print the value of val variable. Then we define a parameterized constructor, in this constructor we use the private variable val that holds the constructor parameter value. Then we define a main function, in the main function we create a class object test which is defined wrong.

That's why the answer to this question is "The program will not compile."  

You might be interested in
Discuss, in brief thedifferent variations of BLAST. (Maximum 5 innumber)
schepotkina [342]

Answer:

Five variations od BLAST are as following:-

  1. BLASTP
  2. BLASTX
  3. TBLASTX
  4. BLASTN
  5. TBLASTN

Explanation:

BLASTP - Searches a protein database with a protein sequence.

BLASTX - This program searches protein database using a translated nucleotide sequence.

TBLASTX - Searches DNA databases using a protein query.

BLASTN -Searches a nucleotide sequence against DNA database.

TBLASTN - Searches nucleotide sequence to a DNA database.

5 0
4 years ago
How long does it take to send a 3 MiB file from Host A to Host B over a circuit-switched network, assuming:
yanalaym [24]

Answer:

The answer is 69.3 ms

Explanation:

if 1 MiB = 0.008388608 Gb

then 3 MiB =  3 x 0.008388608 = 0.025165824 Gb.

since the bandwidth is equally shared amongst two users,  each user gets equal share of the bandwidth which is Total Bandwidth/Number of Users.(

The bandwidth for each user = 30.8/2 = 15.4 Gbps.

The time taken for the message to reach from host A to host B = 0.025165824/15.4 s = 0.00163414441 which is = 1.63 ms.

The link connection requires a setup time of 67.7 ms

Therefore,  the net time required is = 67.7 ms +1.63 ms = 69.3 ms.

4 0
3 years ago
Henry is having a problem with the electrical system on his current laptop. The battery for the laptop will not charge. Henry to
Juliette [100K]

Answer:

There is a short circuit in a component in the power circuit.

Explanation:

The power circuit in a computer system, regulates, rectifies and steps down power and voltage entering the main motherboard.

When a power surge capable of damaging the motherboard occurs, A component in the power circuit is shorted, not allowing the dangerous power to pass.

This can be troubleshooted by passing a high current, since the shorted component has a high emf. It over heats and is detected and changed.

4 0
4 years ago
WAp to input the radius and print<br> the area of circle
Sergeu [11.5K]

Program:-

\tt r=float(input("Enter\:the\:value\:for\:radius\:of\:circle"))

\tt x=3.14*\:r**2

\tt print("Area\:of\:Circle=\{x\}")

<h3>Sample run:-</h3>

\tt r=3

\tt Area\:of\:the\:circle=28.26

7 0
3 years ago
Which gauge indicates the total number of miles your car has been driven since it was manufactured? A. The speedometer B. The ta
In-s [12.5K]
The answer is C. The odometer

<span />
6 0
3 years ago
Read 2 more answers
Other questions:
  • What document is created to identify the areas of testing of a website?
    8·1 answer
  • What are career resources?
    7·2 answers
  • Which statement is true
    12·1 answer
  • B. Write a function that takes one double parameter, and returns a char. The parameter represents a grade, and the char represen
    7·1 answer
  • Which ofthe following is the most correct statement about the interestsection of the indirect plan for persuasion?
    8·1 answer
  • In a client/server architecture, an optional _____ is sometimes used to pass bulk information to the server. a. request line b.
    8·1 answer
  • A company produces coffee makers. The labor cost of assembling one coffee maker during the regular business hours is $2.65. If t
    11·1 answer
  • An objective function in linearprogramming is a(n):
    11·1 answer
  • The variable named var2 declared above will include an ending NULL character.
    9·1 answer
  • How would the grain crusher work
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!