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
Before going into space, astronauts spend many hours training on flight simulators allowing them to learn how to fly without lif
MaRussiya [10]

Answer:

The short answer is, for full-mission flight simulators, specifically by NASA, are built with actual hardware and supported by simulation software. These software take into account every possible scenarios that could be adjusted based on the training. As for the hardware, they receive signals from the software on what they should do.

Explanation:

Some technologies involved are (which are also part of the FAA's requirements):

  1. 6 Degrees of Freedom for motion
  2. Visual systems
  3. Realistic acoustics
  4. Visual effects

This also involves a lot of robotics.

On the topic of motion:

One big and important feature is how motion is simulated - which takes a combined effort of both software and hardware to actually simulate how external forces can also affect the body.

It also takes into account the vibration that is experienced during launch.

The 6 degrees of freedom for motion includes:

  1. Up and down
  2. Left and right - sliding motion
  3. Back and forward
  4. Yaw - turning motion
  5. Pitch - look up and down
  6. Roll

For flight simulators, there are several levels and requirements being used in the aviation training industry. But one thing that you need to know is that the hardware and software mostly take into account motion.

On the topic of visual systems:

The pilots or crew should have a visual representation of what the outside world looks like with at least 150 degrees of view.

Realistic acoustics:

During simulations, actual sounds should also be present based on the real-life sounds produced during flight.

Visual effects:

If the pilot pivots to the right, or is about to breach the exosphere, the system's display should also take that into account and show it to the crew. This also includes visual effects for specific motions being done.

And as a bonus:

Just until recently, everything was analog (meaning, with dials, buttons, and levers) for the actual aircraft simulation that the pilots/astronauts are using. Update are now being made in NASA and SpaceX along with other rocket and spacecraft companies to move from analog to digital (with touch screens).

While this is an abridged version, it should help you to understand the complexities of a flight simulator.

8 0
3 years ago
What statement best describes Konrad Zuse?
vazorg [7]

Answer:

D

Explanation:

Konrad Zuse was a German civil engineer, inventor and computer pioneer. His greatest achievement was the world's first programmable computer; the functional program-controlled Turing-complete Z3 became operational in May 1941.

8 0
3 years ago
Read 2 more answers
2. Consider the two-dimensional array A: int A[][] = new int[100][100]; where A[0][0] is at location 200 in a paged memory syste
bogdanovich [222]

Answer:

Check the explanation

Explanation:

An integer (int) is of two different bytes and each page has 200 bytes in length. What this means is that each row of array A (100 int) will fits perfectly in a page.

(a) For the initial or first array-initialization loop, one column is processed at a time, so a page fault will be generated at every inner loop iteration, with a total of 100*100=10,000 page faults.

(b)  And when it comes to the second array-initialization loop, one row is processed at a time, and a page fault is generated at every outer loop iteration, with a total of 100 page faults.

Hence second array-initialization loop, has better spatial locality.

6 0
3 years ago
A(n) _________ produces dynamic reports, supports alerts/rss functionality, and supports user subscriptions.
lesantik [10]

A(n) BI server produces dynamic reports, supports alerts/RSS functionality, and supports user subscriptions.

<h3>What exactly is BI server?</h3>

An on-premises report server with a web gateway, Power BI Report Server allows you to see and manage reports and KPIs. The tools for generating Power BI reports, paginated reports, mobile reports, and KPIs are also included. A business intelligence server created by Oracle is called Oracle Business Intelligence Enterprise Edition. It has sophisticated business intelligence capabilities that are based on a single architecture. The server offers centralized data access to all corporate entity-related business information.

There are five stages to query compilation in BI server:

  • Parsing
  • Create Logical Requests
  • Navigation
  • Code Generation Rewrite

To learn more about BI server , refer to:

brainly.com/question/7601044

#SPJ4

7 0
2 years ago
PLZ HELP!!!
mariarad [96]
Answer: A. Usability testing
Explanation:
Usability testing would be the correct answer because if the user interface isn't "frendly" then people won't be able to use it properly. Or if you are refering to the word friendly as looking safe, then even more so would be usability testing. Because if people don't like the fonts and styles of the user interface, they might not use it at all.
8 0
2 years ago
Other questions:
  • A password checking system that disallows user passwords that are proper names or words that are normally included in a dictiona
    15·1 answer
  • What is a major plastics engineering project that is going on right now in Arizona?
    9·1 answer
  • How can you achieve an effect like that shown in the image?
    7·2 answers
  • One gigabyte can be expressed as: a.) 1,000 kilobytes b.) 1,000 bytes c.) 80,000 kilobytes d.) 1,000 megabytes e.) 8,000 bits
    5·1 answer
  • It is not important to keep financial records since they can all be found online.
    5·2 answers
  • When targeting customers of the consumer population at market a product, what type of segmentation information would be most hel
    12·2 answers
  • Read the scenario below, and then answer the question.
    13·1 answer
  • How many atoms of oxygen in 4 molecules of HN03​
    12·1 answer
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • What is the difference between
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!