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
Create html code showing heading tags​
kow [346]

Answer:

Assuming you mean the HTML5 head tag, then this may work for you:

<!DOCTYPE HTML>

<html lang="en">

<head>

<title>My Very Awesome Website</title>

<link href="./css/main.css" rel="stylesheet"  />

<meta name="viewport" content="width=device-width, initial-scale=1" />

</head>

<body>

<h1>Hey look</h1>

<p>This is my awesome website!</p>

<h3>Note</h3>

<p>This website is supposed to be 100% awesome!</p>

</body>

</html>

3 0
3 years ago
If you go over 255 in RGB by 1 does it reset to 0 or 1
lana66690 [7]

Answer:

With Apple i remember it was 1.

3 0
3 years ago
You are writing a program to help compare two sports teams. A sample member of the list scores is [2. 5] where your team scored
Slav-nsk [51]

Answer:

The correct answer is C

Explanation:

4 0
3 years ago
Read 2 more answers
Need help finding the totals and with the empty spots
Lunna [17]

Answer:

weff WEF ef ef aeF EFaef  EFE  fe efaef ea f

Explanation:

8 0
3 years ago
True / False
blagie [28]

Answer: True

Explanation:

Variable length instructions generally implemented by CISC processors use memory more efficiently than fixed length instruction of RISC processors sets because CISC supports array whereas RISC does not. Also CISC uses more complex addressing modes which consumes less memory cycles and the the program is also reduces. In Fixed length instruction in RISC processor the simple instructions has to be used a number of time which leads to more memory cycles.

7 0
4 years ago
Other questions:
  • Which one of the following features can control left and right indents using markers?
    5·2 answers
  • What are the correct steps to find the system specifications such as the amount of ram or system type?
    14·2 answers
  • Ex. Q about the crazy effects of complements/substitutes on a wide range of goods:
    7·1 answer
  • Josh wants to convey his best wishes to johnathin for a meeting schedualed later diring the day. Which business documented would
    7·1 answer
  • Directions: Using the decoder key and the code chart on the second page, find out the name that has been coded. After coding the
    15·1 answer
  • Let's practice Audience analysis by going to the Google Merchandise Store demo account with a date range of Feb 1, 2016 - Feb 29
    13·1 answer
  • You don't have to answer them all, just give me 2 or 3. Thanks
    7·1 answer
  • What is the difference between ionizing and non-ionizing radiation?
    7·2 answers
  • The introduction of an academic paper must include a:
    12·2 answers
  • Refer to Table 8-4. Consider the data above (in billions of dollars) for an economy: Gross domestic product (in billions of doll
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!