C-based pseudo code

Assignment Help Basic Computer Science
Reference no: EM132323060

Consider the following C-based pseudo code: 

int x, y;

int f(int *i) { 

  *i += 2;

  y++;

  return i;

}

void main() {

  int x = 1;

  int y = 2;

  x = x * y + f( & x);

}

What is the value of x after the assignment statement in main, assuming

a) operands are evaluated left to right: x = 1*2 + 3 = 5.

b) operands are evaluated right to left: x = 3*3 + 3 = 12.

Reference no: EM132323060

Questions Cloud

Draw a diagram for a non-deterministic finite state : Draw a diagram for a non-deterministic finite state machine for the language L = { w e {a,b,c}* : w contains aabbcc}
Analyse the uniqueness of apple design process : Compare and contrast the Agile method and Evolutionary software development process. Explain with an example - Analyse the uniqueness of Apple design process
Prepare a business research project : Assignment - Project - Research project. Prepare a business research project. Need 5000 to 8000 words (excluding appendices and reference list)
Describe an example that you have encountered about data : Describe an example that you have encountered about data errors or missing data. What could have been done to prevent or correct this error?
C-based pseudo code : Consider the following C-based pseudo code:
How much interest does the company pay to its bondholders : Record the issuance for bond at 99. How much interest does the company pay (in cash) to its bondholders every six months if the bonds are sold at par?
What are some emerging technology trends : What are some emerging technology trends that have influenced your personal choice of an SDLC, either in your experience
Describe the characteristics of your ideal computer : What would you use it for? Would you choose a handheld, portable, desktop or workstation computer? Why?
Why a company might choose to issue a bond instead of stock : Often times when large amount of funds are needed for a project or expansion, companies and governments seek financing to help pursue these projects.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Estimate the rate of heat flow from the fin

A stainless steel pin fin 5 cm long and with a 6-mm OD, extends from a flat plate into a 175 m/s airstream, as shown in the sketch at top of next column.

  Social networks and mobile computing

Explain how the following industries should adapt their businesses to the ever expanding use of social networks and mobile computing.

  Show how to solve the datalog query ancestor(aa,x)

Show the same query by computing only the changes in the ancestor relation and using that in rule 2 each time. [This question is derived from Bancilhon and Ramakrishnan (1986).]

  Indicate the completion of task microprocessor uses

To indicate the completion of task allocated in a closely (tightly) coupled system, the microprocessor uses

  Estimate the present value of the tax benefits

The cost of capital is 11%, and the firm's tax rate is 39%. Estimate the present value of the tax benefits from depreciation.

  Write complete javadoc style comments

Write complete JavaDoc style comments for all methods and for the class. Include your name at the top of the assignment as a block comment

  Create custom modeled three-d buildings with textures

Create custom modeled 3D buildings/structures with textures for your village/outpost or whatever theme you are working on. It doesn't have to be fully detailed but I also do not want just a cube with basic texturing.

  Why program design is important

What is a program design? Why program design is important? What program design tools are available? Discuss in details by studying at least three program design tools and how they can help in better program design and C code?

  Which were put into inventories the end of the year

Companies were left with $100,000 worth of goods and services, which were put into inventories the end of the year. Is it part of GDP?

  Why the algorithm issorted is not sufficient to prove

Linda creates an algorithm that takes an input sequence S and produces an output sequence T that is a sorting of the n elements of S.

  Compare and contrast static scoring of the budget

Compare and contrast static scoring of the budget with dynamic scoring when it comes to evaluating the effect of a policy change.

  Construct a class named person

Use the Person class functions to simulate a random arrival of a person and a random request for a floor to which the elevator should take this person.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd