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
Lady_Fox [76]
2 years ago
9

What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout <<

x << '\n'; doSomething(x); cout << x << '\n'; return 0; } void doSomething(int num) { num = 0; cout << num << '\n';
Computers and Technology
1 answer:
Leno4ka [110]2 years ago
8 0

Answer:

The code will display the following on the screen:-

2

0

2

Explanation:

The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.

You might be interested in
An insurance company utilizes SAP HANA for its day-to-day ERP operations. Since they can’t migrate this database due to customer
hichkok12 [17]

Answer: An Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network

Explanation:

Based on the information given, an Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network need to be configured outside of the VPC for them to have a successful site-to-site VPN connection.

The Internet-routable IP address will be used in the identificatiob of each computer through the use of the Internet Protocol for the communication over a network.

3 0
3 years ago
In his article, “How to Publish Without Perishing,” what does James Gleick believe most people do when they really read a book?
jonny [76]

Answer:

James Gleick believes that they immerse themselves in a rich textual world. The answer is C.

3 0
2 years ago
Read 2 more answers
Which logic gate produces an output of 1 only if both its inputs are 0
Anettt [7]

0=false

1=true

false + false = true

0+0=1

+ operator = and function

AND GATE

8 0
2 years ago
Read 2 more answers
A table of contents does not _____ automatically [customize table of contents]
anyanavicka [17]

Answer:

update

Explanation:

a table of contents does not update itself automatically.

5 0
2 years ago
In order to use SliIn order to use Slicers to filter some data, what must you first do to that data?cers to filter some data, wh
lakkis [162]

Answer:

<em />

<em>Splicers provide buttons that you can click to filter tables, or PivotTables. In addition to quick filtering, slicers also indicate the current filtering state, which makes it easy to understand what exactly is currently displayed animation</em>

<em />

8 0
3 years ago
Other questions:
  • Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
    5·1 answer
  • Describe the general process of creating a DataFlow Diagram (DFD)
    7·1 answer
  • One of the earlier applications of crypto-graphic hash functions was the storage of passwords to authenticate usersin computer s
    13·1 answer
  • The following memo does not follow the correct format. What should be changed? To: Stacy, Allen, and Emma Date: August 12, 2012
    10·2 answers
  • Which of the following are examples of software? Check all of the boxes that apply.
    12·2 answers
  • Integration Management, one of the 10 PMBOK Guide Knowledge Areas, represents the processes and activities to identify, define,
    12·1 answer
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • Write code that uses the input string stream inSS to read input data from string userInput, and updates variables userMonth, use
    8·1 answer
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • What does an effect allow you to do in<br> EarSketch?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!