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
Nitella [24]
2 years ago
7

Consider the following program written in C syntax:

Computers and Technology
1 answer:
postnew [5]2 years ago
4 0

The values of the variables value and list after each of the three calls to

swap are:

  • value = 2 and  list[5] = {1, 3, 5, 7, 9};
  • value = 2 and  list[5] = {3, 1, 5, 7, 9};
  • value = 2 and  list[5] = {3, 1, 5, 7, 9};

<h3>How to determine the values of variable value and the list?</h3>

<u>1. Passed by value</u>

In this case, the values of the actual arguments remain unchanged; So the variable value and the list would retain their initial values

The end result is:

value = 2 and  list[5] = {1, 3, 5, 7, 9};

<u>2. Passed by reference</u>

With pass by reference, the arguments are changed.

Given that

value = 2 and  list[5] = {1, 3, 5, 7, 9};

The value of variable value is swapped with list[0].

So, we have:

value = 1 and  list[5] = {2, 3, 5, 7, 9};

Then list[0] and list[1] are swapped

So, we have:

value = 1 and  list[5] = {3, 2, 5, 7, 9};

Lastly, value and list[value] are swapped

So, we have:

value = 2 and  list[5] = {3, 1, 5, 7, 9};

The end result is:

value = 2 and  list[5] = {3, 1, 5, 7, 9};

<u>3. Passed by value-result</u>

Since there is no loop in the program, the pass by value-result has the same output as the pass by reference.

So, the end result is:

value = 2 and  list[5] = {3, 1, 5, 7, 9};

Read more about C syntax at:

brainly.com/question/15705612

You might be interested in
An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in
sammy [17]

Answer:

b. The names in the list should be in alphabetical order.

Explanation:

A binary search is an algorithm used for searching for an item in a list or array. The algorithm first sorts the data structure into order and then divides it into halves. If the searched item is less than the middle item in the list, then the algorithm searches for the target in the first half, else, in the second half. This reduces the time complexity of the search.

5 0
3 years ago
What should I do when the computer doesn't display Korean?(They are all □□)
bogdanovich [222]

Answer:

I Think You Could Go To Settings And Change It

Explanation:

I Think This Helps

5 0
3 years ago
One way to make a data table stand out on the screen and help bring the viewer’s attention to it is to add a shadow behind the t
olganol [36]
A user can add a shadow to a table on Power Point presentation, b<span>y choosing the Layout tab under Table Tools, clicking on Effects, and selecting Shadow. The shadow can be inner, outer or perspective. The most commonly used is outer shadow.
</span>Adding a shadow behind the table will make the <span>data table to stand out on the screen and help bring the viewer’s attention.
Shades can be added also on text, tables, pictures inserted in the presentation and other object. </span>
7 0
3 years ago
Read 2 more answers
Phillip wants to create a new Google Display Ad campaign and base his targeting on an existing remarketing list named Checkout A
77julia77 [94]

Answer:

Similar Audience that finds who are similar to those on the Checkout Abandoners list.

Explanation:

Phillip needs to develop the latest google Display Advertising project, as well as focus its aiming over a current Checkout Abandoners shopping list. Thus, that Similar Audience which identifies users specific for others throughout the Abandoners checkout detail to support Phillip accomplish his promotional objectives.

3 0
3 years ago
If the numbers on the spring scales read 200 g. What property of the shoes is being measured?
lianna [129]
Pretty sure its mass
5 0
3 years ago
Other questions:
  • What are the five types of pointing devices?
    11·1 answer
  • Dylan, an interior designer, has sketched out a layout for a client's living room. He wants the client's approval of the layout
    11·2 answers
  • The ________ Web, originally envisioned by Tim Berners-Lee, one of the founders of the Internet, is a set of design principles t
    15·1 answer
  • A company has recently learned of a person trying to obtain personal information of employees illegally. According to which act
    15·2 answers
  • Most hard drives are divided into sectors of 512 bytes each. Our disk has a size of 16 GB. Fill in the blank to calculate how ma
    9·1 answer
  • Privacy Group of answer choices must be respected if we are to function as complete, self-governing agents is an absolute value
    5·1 answer
  • 14. Which of the following is NOT likely to be one of the future development gaming industry?
    7·1 answer
  • .WAP to enter monthly sale of Salesman and give him commission i.E. If the monthly sale is more than 500000 then commision will
    6·1 answer
  • Just a quick question, how do you set something == to char and int in an if statement (java)
    10·1 answer
  • 2. What is MOST TRUE of a mature technology?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!