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
slega [8]
3 years ago
11

What is the output of the following program?#include using namespace std;void doSomething(∫);int main(){int x = 2;cout <<

x << endl;doSomething(x);cout << x << endl;return 0;}void doSomething(int &num){num = 0;cout << num << endl;}
Computers and Technology
1 answer:
algol [13]3 years ago
8 0

Answer:

The outputs of the code is

2

0

2

Explanation:

First, I'll arrange the code line by line. While arranging the code, I'll make some corrections

#include <iostream>

using namespace std;

void doSomething();

int main(){

int x = 2;

cout << x <<endl;

doSomething(x);

cout << x << endl;

return 0;

}

void doSomething(int &num)

{

num = 0;

cout << num << endl;

}

At line 6, the value of x which is 2 is printed and the line is terminated to prevent printing of value on the same line. So, the next print statement will start on the next line.

At line 7, the function doSomething () is called.

This statement will execute the instructions in the doSomething () function and print value 0. This line is also terminated.

At line 8, the value of x is printed which is also 2

You might be interested in
Successful attacks are commonly called ________. a. security incidents b. countermeasures c. both a and b d. neither a nor b
nadya68 [22]
Hey there,
The answer is Security Incidents

Hope this helps :))

~Top
4 0
3 years ago
1. Name a two methods for creating text in Adobe Illustrator.
Fittoniya [83]

Answer:

Point type is a horizontal or vertical line of text that begins where you click and expands as you enter characters. Each line of text is independent—the line expands or shrinks as you edit it, but doesn’t wrap to the next line. Entering text this way is useful for adding a few words to your artwork.

Select the Type tool  or the Vertical Type tool .

The pointer changes to an I-beam within a dotted box. The small horizontal line near the bottom of the I-beam marks the position of the baseline, on which the text rests.

(Optional) Set text-formatting options in the Control panel, Character panel, or Paragraph panel.

Click where you want the line of text to begin.

Explanation:

4 0
3 years ago
In its entirety, the CCM process reduces the risk that ANY modifications made to a system result in a compromise to system or da
Tom [10]

Answer: True

Explanation: CCM process is the process which basically watches over any change or modification that is being made in the data and it will only be implemented when there is no adverse effect of the change.It procedure helps in reducing the risk due to any modification made in data of a system. CCM process also take care of the confidentiality of data and integrity as well and helps inn maintaining it.Therefore the given statement is true.

8 0
3 years ago
What automatically created subdomain holds all the SRV records for Microsoft-hosted services, such as the global catalog, LDAP,
nevsk [136]

Answer:

The correct answer to the following question will be "_msdcs".

Explanation:

Msdcs directory known as Microsoft Domain Controller Catalog requires SRV documents that are used to identify domain controller for certain operations.

  • It automatically generated subdomain keeps all Microsoft-hosted resources SRV data, so it's the correct answer.
  • It includes common SRV documents, documents of LDAP, documents of Kpass, CNAME, etc.
7 0
4 years ago
Suppose you are implementing the address book feature for a cellphone. The address book needs to be kept sorted by person’s last
NemiM [27]

Answer:

Sorted linked list

Explanation:

  • A sorted linked list can be used for sorting the last name and support fast access while queried by the last name.
  • The hash table cannot be used because it could have a problem if there would be more buckets to handle than the expected.
  • The binary search table is implemented as the hash table hence both will give the same results.
8 0
3 years ago
Other questions:
  • What are the three main components of an IF function?
    12·1 answer
  • Items in the __________ area of a class are accessible to all entities that can "see" the object(s) of that class type
    10·1 answer
  • A​ _______ variable is a variable that has a single numerical​ value, determined by​ chance, for each outcome of a procedure.
    7·1 answer
  • What is the advertising photographer’s main objective in creating an image?
    11·1 answer
  • In powerpoint a point is _____ of an inch in height.
    6·1 answer
  • A constructor: A. always accepts two arguments B. has return type of void C. has the same name as the class D. always has an acc
    9·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    5·1 answer
  • I need help solving this problem on Picoctf. The question is What happens if you have a small exponent? There is a twist though,
    7·1 answer
  • What is live ware in relation to computer​
    8·1 answer
  • Write a code snippet Now write your own code snippet that asks the user to enter two numbers of integer type (one at a time) and
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!