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
sergij07 [2.7K]
4 years ago
11

Consider the following C program: int fun(int *i) { *i += 5; return 4; } 352 Chapter 7 Expressions and Assignment Statements voi

d main() { int x = 3; x = x + fun(&x); } What is the value of x after the assignment statement in main, assuming a. operands are evaluated left to right. b. operands are evaluated right to left
Computers and Technology
1 answer:
Musya8 [376]4 years ago
4 0

Answer:

a. operands are evaluated left toright. 7

b. operands are evaluated right toleft. 12

Explanation:

a. operands are evaluated left toright. 7

b. operands are evaluated right toleft. 12

left to right

int fun (int *i) {

*i +=5; we add 5to x making x 8

return4; we return 4 tomain

}

void main ( ) {

int x = 3;

x = x + fun(&x); x starts at 3 in fun it ischanged to 8 but the 3 is already being used the 4 fromfun is added (3+4) to it making it 7

}

right toleft x starts at 3 in fun x gets changed to 8 and fun is returned as 4so we have 4 + 8 = 12

Paraphrasing

left to right it's is 3 + 4 =7 original value of x is used

right to left it is 4 + 8 =12 x is used as it was changed by fun, since fun was alreadyexecuted

You might be interested in
The part of a door frame that comes in contact with the door is the _________.
wlad13 [49]
The part of a door frame that comes in contact with the door is the jamb
4 0
3 years ago
* Declare a variable called "race" of type "Race", andinitialise its value to a new instance of the "Race" class. The"Race" cons
goldfiish [28.3K]

Answer:

Race race = new Race(track, car);

Explanation:

Complete code fragment is as follows:

Track track = new Track();

Car car = mycar;

Race race = new Race(track,car);

Here we are declaring a variable race of the type Race  which is initialized to new instance of Race class. The constructor of race takes up the following 2 arguments:

1) New Instance of Track class;

2) Previously defined reference to an object of type Car.

4 0
4 years ago
What does a production possibilities curve represent?Which of the following statements are true? Economic stability means fair d
REY [17]

Answer:

<u>What does a production possibilities curve represent?</u>

The Production Possibilities Curve (PPC) is a model used to show the tradeoffs associated with allocating resources between the production of two goods. The PPC can be used to illustrate the concepts of scarcity, opportunity cost, efficiency, inefficiency, economic growth, and contractions.

<u>Which of the following statements are true? </u>

Full employment is a macroeconomic goal.

4 0
3 years ago
Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
Strike441 [17]

Answer:

yes it can communicate with all interfaces on the router.

Explanation:

PC1 has the right default gateway and is using the link-local address on R1. All connected networks are on the routing table.

Netsh may be a Windows command wont to display and modify the network configuration of a currently running local or remote computer. These activities will tell you in how manny ways we can use the netsh command to configure IPv6 settings.

To use this command :

1. Open prompt .

2. Use ipconfig to display IP address information. Observe the  output whether IPv6 is enabled, you ought to see one or more IPv6 addresses. A typical Windows 7 computer features a Link-local IPv6 Address, an ISATAP tunnel adapter with media disconnected, and a Teredo tunnel adapter. Link-local addresses begin with fe80::/10. ISATAP addresses are specific link-local addresses.  

3. Type netsh interface ipv6 show interfaces and press Enter. note the output listing the interfaces on which IPv6 is enabled. Note that each one netsh parameters could also be abbreviated, as long because the abbreviation may be a unique parameter. netsh interface ipv6 show interfaces could also be entered as netsh  ipv6 sh i.

4. Type netsh interface ipv6 show addresses  Observe the results  of the interface IPv6 addresses.

5. Type netsh interface ipv6 show destinationcache and press Enter. Observe the output of recent IPv6 destinations.

6. Type netsh interface ipv6 show dnsservers and press Enter. Observe the results listing IPv6 DNS server settings.

7. Type netsh interface ipv6 show neighbors and press Enter. Observe the results listing IPv6 neighbors. this is often almost like the IPv4 ARP cache.

8. Type netsh interface ipv6 show route and press Enter. Observe the results listing IPv6 route information.

5 0
3 years ago
Alex is setting up a network for his company's computers. He installs a circuit board into each computer, enabling it to be conn
Nitella [24]
If it's an ethernet network:  <span>network interface card</span>
6 0
3 years ago
Other questions:
  • When technology advances which of the following always takes place?
    6·2 answers
  • F=M×A<br> What is the acceleration of 50kg object pushed with a force of 500 newton?
    14·1 answer
  • Digital libraries are often available to students and/or employees at colleges, schools, and BLANK institutions.
    15·1 answer
  • A Network Management Station (NMS) is using SNMP to manage some Cisco routers and switches with SNMPv2c. Which of the following
    10·2 answers
  • On an unweighted scale, a grade of A is worth _____ points
    7·1 answer
  • Write a method drivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar co
    12·1 answer
  • What will happen if you delete system32?
    7·1 answer
  • III. FILL-IN THE BLANK (five points each)
    14·1 answer
  • List and briefly describe the major types of system in organization?​
    15·2 answers
  • In best practice, should you use all lowercase, all uppercase or a mixture of cases in HTML tag names?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!