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
drek231 [11]
3 years ago
15

Given the following: int funcOne(int n) { n *= 2; return n; } int funcTwo(int &n) { n *= 10; return n; } What will the follo

wing code output? int n = 30; n = funcOne(funcTwo(n)); cout << "num1 = " << n << endl; Group of answer choices Error num1 = 60 num 1 = 30 num1 = 600 num1 = 300
Computers and Technology
1 answer:
tankabanditka [31]3 years ago
3 0

Answer:

num1 = 600

Explanation:

Given

The attached code snippet

Required

The output of n = funcOne(funcTwo(n));  when n = 30

The inner function is first executed, i.e.

funcTwo(n)

When n = 30, we have:

funcTwo(30)

This returns the product of n and 10 i.e. 30 * 10 = 300

So:

funcTwo(30) = 300

n = funcOne(funcTwo(n)); becomes: n = funcOne(300);

This passes 300 to funcOne; So, we have:

n = funcOne(300);

This returns the product of n and 2 i.e. 300 * 2 = 600

<em>Hence, the output is 600</em>

You might be interested in
Unscramble the risks of sharing files on the Intern
Zinaida [17]

Answer:

Broken Firewall, Piracy, Malware, Virus, adware

Explanation:

Please give brainliest if this helps

4 0
3 years ago
How the (i)?? Help me to slove this
cupoosta [38]

Answer:

#include <fstream>

 ifstream inFile("bookBorrower.txt");

 ofstream outFiles ("overPayment.txt");

Explanation:

fstream has ifstream and ofstream for input and output, respectively.

4 0
2 years ago
Which tab is used to edit objects on the Slide Master and layouts?
andreev551 [17]
When your trying to master the slide layouts you must go to the Slide Layout tab.
4 0
3 years ago
Field whose data type is ____ can contain any characters.
liubo4ka [24]

1. B

2. A

3.C

4.D

5.C

6.B

7.D

8.A

9.C

10.D

11.D

12.A

13.B

14.C

15.D

7 0
3 years ago
HELP 100 points
natima [27]

Answer:

i do not know what to do there.

Explanation:

there's no pictures

5 0
2 years ago
Other questions:
  • Which of the following types of copyright license is most appropriate if you write a novel and would like to post it online for
    11·1 answer
  • The presentation ____ determines the formatting characteristics of fonts and colors.
    11·2 answers
  • When you right-click a word with a red squiggly line under it, which of the following displays?
    12·2 answers
  • The statement x++;
    11·1 answer
  • Bobbi owns a protein shake company, which has been trading for 3 years. Her products are stocked in a number of gyms, but the co
    11·1 answer
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    5·1 answer
  • Implement a function with signature barGraph(w, h, data) which creates and returns a cs1graphics.Canvas instance that has width
    9·1 answer
  • How do you write a multiplication formula in excel with an absolute refrence?
    11·1 answer
  • Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
    7·1 answer
  • Will give BRAINLIEST, PLEASE HELP, WILL BE MUCH APPRECIATED
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!