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
Which of the following security policies can be implemented to prevent removable media from automatically launching potentially
il63 [147K]

The security policy that can be implemented to prevent removable media from automatically launching potentially harmful programs is Disable AutoRun.

<h3>Why should one disable AutoRun?</h3>

The Autorun is known to be a system function that often launches every time, and as such, it renders your system to be open to viruses, malwares, trojans etc.

Conclusively, The act of Disabling the autorun feature is one that can hinder malware from spreading in your system.

Learn more about computer from

brainly.com/question/24540334

4 0
3 years ago
What is the first step of viewing a web page as described in the video?
Sonja [21]

Answer:

URL

Explanation:

The order is URL, request, response, then render

4 0
3 years ago
The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
Nana76 [90]

Answer:

The answer is "Option d'.

Explanation:

The database provides a single graphical view of the data, but it  provides the facility to use logical view concept, that uses by view command, that uses the dataset to provide a logical view, that shows data according to user condition, and certain options were incorrect which can be described as follows:

  • In option a, In logical viewing data, it is not used.
  • In option b, It doesn't represent entry screen it simply shows detail.
  • In option c, this command doesn't allow you to create duplicate data.
4 0
3 years ago
Which of the following is true of lossy and lossless compression algorithms?
taurus [48]

B. Lossy compression algorithms are typically better than lossless compression algorithms at reducing the number of bits needed to represent a piece of data.

7 0
3 years ago
In the context of intentional security threats, _____ can erase data and wreak havoc on computers and networks but do not replic
mihalych1998 [28]

Answer:

The answer is "Option D".

Explanation:

Trojan program is a malicious code that is also known as a virus. It is a rootkit, that aims to infect the computer to hide or obscure an object. These programs are mainly used to download additional content, such as additional pieces of malware, to the infected computer, and other options are wrong that can be defined as follows:

  • In option A, It is not correct, this option infects the system.
  • In option B, It is used for infects another computer that's why it is incorrect.
  • In option C, It is incorrect because it is used in cybersecurity.  
5 0
3 years ago
Other questions:
  • Write a program that generates a random number and asks the user to guess what the number is. If the user's guess is higher than
    6·1 answer
  • Technlogies are having a negative impact on business true or false
    7·1 answer
  • Fractures in Earth’s crust where displacement has occurred are called
    13·1 answer
  • Help!!! Who is this? Who is it from?
    14·2 answers
  • Which of the following can be considered beta testing? A programmer at Linus Systems checks the integration of multiple modules
    14·1 answer
  • Write a program called DeliveryCharges for the package delivery service in Exercise 4. The program should again use an array tha
    9·1 answer
  • Sound can be converted from the electrical energy inside a computer into the mechanical energy of soundwaves in air by using
    9·1 answer
  • Words that are restricted for use in object names because they belong to the SQL programming language are called _______________
    13·1 answer
  • Fill _________ skips the Saturday and Sunday dates in a date fill.
    10·1 answer
  • Need help completing this coding assignment.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!