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
KonstantinChe [14]
3 years ago
8

What is the output of the following program segment? int main() { int num = 5; cout << num <<" "; change(num); cout

<< num << endl; return 0; } void change (int &num) { num = 10; }
Computers and Technology
1 answer:
11Alexandr11 [23.1K]3 years ago
6 0

Answer:

The output of the given C++ language code is as follows:

Output:

5 10

Explanation:

Description of the given C++ language code as follows:

  • In this code, the main method is defined inside the main method an integer variable num is declared that contains a value that is "5".
  • In this method first, a variable value is printed then a function that is "change" is called then we print function value.
  • In the last, a change method is defined, which contains an integer variable "num" in its parameter, and inside a function num variable another value is defined, that is 10, that's why the first 5 and then 10 value is printed.

You might be interested in
I'm new to programming and I'm starting with c++, so the first program I want to write should take a string of characters and ou
Amanda [17]
#include <iostream>
#include <string>

using namespace std;

int main() {

string userInput;
cout << "Enter word" << endl;

cin >> userInput;

cout << "you entered" << endl;
cout << userInput;

return 0;

}
5 0
3 years ago
Read 2 more answers
Pros and cons of the inter's<br> ability to access information
SpyIntel [72]
Pros and cons of the internet are the pros you can get the informaqtion needed to research and find out any information at your finger tips and get the answerws you need to certqin things fast. The cons the main one ise the people who misuse this to st4eal your information and indenity.
7 0
3 years ago
What effect does slow sync flash result in
AlladinOne [14]

bad graphics, slow running ,bad connection

7 0
3 years ago
Give an example of a situation in which a compromise of Confidentiality leads to compromise in Integrity.Situation where confide
il63 [147K]

Answer: An example of such a scenario would be when the user name and password meant to allow access to a customers bank account statement is cracked by unauthorized people this causing alteration (in the form of data diddling attacks) in the data contained in the statement. This is a compromise in integrity.

Explanation:

Confidentiality entails securing things people want to remain secret. An account statement of a bank customer is a confidential document which is to be kept secret. A password allows access to it.

Integrity implies receiving a sent data/information as accurately as it came from a sender. A data diddling attack alter integrity because the original information is altered by an unauthorized person.

7 0
3 years ago
What does the octal number 362 represent in the decimal system?
kykrilka [37]
The answer is E. 242
8 0
3 years ago
Other questions:
  • What term identifies hard drives enclosed in a case other than your computer's case? A External hard drives B Flash drives C CD-
    8·2 answers
  • In Word, the default typing mode is ____ mode, which means as you type a character, Word moves all the characters to the right o
    14·2 answers
  • What may happen if a large number of computer users are attempting to access a web page
    12·1 answer
  • You (blank) see stop signs on highways.
    9·2 answers
  • What is the protocol developed for the wireless network communications? explain?
    8·1 answer
  • The body element is where you provide browsers with information about the document
    12·1 answer
  • Gigantic Life Insurance is organized as a single domain. The network manager is concerned that dividing into multiple domains to
    15·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    11·1 answer
  • Why concurrency control is needed in transaction.
    5·1 answer
  • Sierra needs to ensure that when users are entering data into a datasheet or form that they are limited in the values they can s
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!