What are the values of sum1 and sum2

Assignment Help C/C++ Programming
Reference no: EM13939598

Let the function fun be defined as

int fun(int *k) {
*k += 4;
return 3 * (*k) - 1;
}

Suppose fun is used in a program as follows
void main() {
int I = 10, j = 10, sum1, sum2;
sum1 = (I / 2) + fun(&i);
sum2 - fun(&j) + (j / 2);
}

What are the values of sum1 and sum2

a. if the operands in the expressions are evaluated left to right?

b. If the operands in the expressions are evaluated right to left?

Reference no: EM13939598

Questions Cloud

What is the value today of a security that promises to pay : What is the value today of a security that promises to pay $1,000 in one quarter, with payments increasing at 1% per quarter thereafter? Payments are made each quarter forever. Our opportunity cost of capital is 12% per annum.
Student suffering financial hardship : A written statement of approximately 200 words outlining what new opportunities a bursary will assist a student suffering financial hardship, to continue their studies.
Describe the main points of the drug-control program : Write a report that summarizes the information that the document provides about each major drug category. Briefly describe the main points of the drug-control program that the document outlines. Be sure to address the following questions: What t..
Arithmetic and geometric returns for the stock : A stock has had returns of 12 percent, 19 percent, 21 percent, −12 percent, 26 percent, and −5 percent over the last six years. What are the arithmetic and geometric returns for the stock?
What are the values of sum1 and sum2 : If the operands in the expressions are evaluated right to left?
Compute the levered bheta : We have the X firm on which we have the following information. Its bheta unlevered is 3, its D/E is 4/1, and its tax rate is .3. Additionally we know that the default free rate is 5% and the stock market has returned 11 % over a long period of time. ..
Problem regarding the state leaders-politicians : You are required to select one of the famous (current or past) state leaders/politicians from the List A and one of the famous (current or past) CEOs from the List B.
Business report on application of cultural approaches : Description/Focus: Business Report on application of cultural and critical approaches to an Australian Organization.
Calculate after-tax cash flow at disposal : Genetic Insights Co. purchases an asset for $11,576. This asset qualifies as a seven-year recovery asset under MACRS. The seven-year fixed depreciation percentages for years 1, 2, 3, 4, 5, and 6 are 14.29%, 24.49%, 17.49%, 12.49%, 8.93%, and 8.93%, r..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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