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]
3 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]3 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
Which of the following Statements accurately describes the legality of telemarketing
fenix001 [56]
Telemarketing (sometimes known as inside sales, or telesales in the UK and Ireland) is a method of direct marketing in which a salesperson solicits prospective customers to buy products or services, either over the phone or through a subsequent face to face or Web conferencing appointment scheduled during the call.

But to answer your question you need to add the options dude


7 0
3 years ago
What should you include in a persuasive speech
Vlad [161]

Answer:

Come up with a controversial topic, one that make your listeners think

Research the topic thoroughly that you have chosen

Understand the perspective of your audience. Keep your goal in mind. You are trying to persuade the audience to do or believe something .

7 0
3 years ago
In which drawer can you set certain lights to light up on your micro:bit?
zheka24 [161]

Answer:

In which drawer can yu set certain lights t light up n yur micr:bit?

Explanation:

4 0
3 years ago
Read 2 more answers
What will the output be from the following program?
ser-zykov [4K]

Answer:

3 + 4 hope it helps for you

Explanation:

mark brainest

7 0
3 years ago
Can somebody help me?
vlabodo [156]
I believe the answer is B. Optimization because it means to make work more efficient but I might be wrong. Checking definitions, this one seems more logical. 
3 0
3 years ago
Other questions:
  • Which online text source would include a review of a new TV show?
    9·2 answers
  • Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
    9·1 answer
  • Weather satellites orbit Earth at an altitude of 1,400,000 meters. What is this altitude in kilometers?
    7·1 answer
  • How often are computer and user policies applied after a user has logged into a computer?
    15·1 answer
  • No matter what medium connects computers on network-copper wires, fiber-optic cables, or a wireless setup; the same protocol mus
    11·1 answer
  • What is the output of the following program? If there is any problem, how can
    13·1 answer
  • You are a network administrator for your company. The network consists of a single Active Directory domain. All servers run Wind
    7·1 answer
  • Barbara, an employee, has properly connected her personal wireless router to a network jack inside her office. The router is una
    7·1 answer
  • You can resize a row in a table by dragging the ____.
    13·1 answer
  • If C2=20 and D2=10 what is the result of the function = mathcal I F(C2=D2,^ prime prime Ful "Open")?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!