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
A fast food chain that wants to inform consumers about its latest dollar menu item will most likely use ___ to do so. ____ may i
Eva8 [605]
The correct answer is 1: B new tech and 2:C we can tell by the way businesses are incorporating things like social media like how Wendys got more popular because of their sassy tweets
3 0
3 years ago
Read 2 more answers
How do you take a screen shot on hp pavilion dm3
drek231 [11]
Press and hold down the "Fn" button while pressing the "Home Prt Sc" button above the numeric keypad to capture the entire screen. Make a screenshot of the active window only by holding down the "Fn" and Alt" keys while pressing "Home Prt Sc." 2. Press the "Start" button, and type "Paint" into the search box.
5 0
3 years ago
Since the actions in a textual storyboard are often very close to actual program code, the statements in a textual storyboard ar
Kaylis [27]

Answer: Pseudo code

Explanation:Pseudo code is a false code that is written in the textual story board to make the fictional plot of the story more understandable in the layman terms for everyone.This is done to increase the readability of the code , which cannot be understood easily by the actual code.

It is implemented on the algorithms of a program in computer field so that the complex coding statements can be understood by the programmer.

7 0
3 years ago
The Occupational Outlook Handbook is published by the Bureau of Labor Statistics.
nika2105 [10]
HEY THEIR

The correct answer is A. true.

It was written in 1948 by the bureau of Labor statistics .

HOPE IT HELPS YOU
7 0
3 years ago
PLEASE HELP GIVING 25 POINTS Sophia is leading a project to help clean up a local river in her area. She creates an online forum
nignag [31]

Answer:

She holds useful online meetings

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • What is malware short for?
    13·2 answers
  • To name a computed field, follow the computation with the word ____ and then the name you wish to assign to the field
    8·1 answer
  • Which column and row references are updated when you copy the formula: =F$5+12? Value 12 Column F Column F and row 5 Row 5
    8·1 answer
  • What is a recent technological breakthrough with an impact that can be compared to the invention of paper nearly 2,000 years ago
    8·1 answer
  • The building blocks of coded language are called
    11·2 answers
  • How many dog breed are there
    9·2 answers
  • PLEASE HELP!!! THIS IS DUE TODAY! WILL MARK BRAINLIEST!
    5·1 answer
  • 1. It is acceptable to use a jack that has been
    13·1 answer
  • Part of the operating system core is responsible for controlling security, managing the file system, and providing a platform fo
    6·1 answer
  • The tools, skills, knowledge, and machines created and used by humans is known as.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!