What is the output of the statements

Assignment Help Computer Engineering
Reference no: EM1332144

What is the output of the following statements? Suppose a and b are int variables, c is a double variable, and a = 13, b = 5, and c = 17.5.

a. cout <<a + b - c << endl; = 0.5
b. cout << 15 / 2 + c << endl; = 25
c. cout << a / static_cast<double>(b) + 2 * c << endl; = 37
d. cout << 14 % 3 + 6.3 + b / a << endl; = 8.6846153
e. cout << static_cast<int>(c) % 5 + a - b << endl; = 11
f. cout << 13.5 / 2 + 4.0 * 3.5 + 18 << endl; = 33.75

Reference no: EM1332144

Questions Cloud

Make a function definition called backward : build a function definition called backward, with three parameters, the first and second parameters are arrays of integers of equal size and the third is an integer indicating the size of each array.
Make a function definition called reverse : Write down a function definition called reverse, with two parameters, the first is an array of integer and the second is the number of elements in the array. The function reverses the elements of the array and does not return a value.
Create program to read the lengths of the two legs : Write down a program to read the lengths of the two legs of a right triangle and to calculate and display the area of the triangle (one-half the product of the legs) and the length of the hypotenuse (square root of the sum of the square of the leg..
Consider the importance of defining the problem : Discuss the importance of defining the problem and what might happen if the problem is not defined properly. Note that in class problems will be defined.
What is the output of the statements : What is the output of the following statements. assume a and b are int variables.
Why does the windows frequently crash : Why use functions at all? Programs could be written without them, so why bother with all the overhead.
Calculate the discount factor : Calculate the discount factor for each year (use 4% discount rate @ 15 years) Calculate the annual present value cost of maintenance (15 years) Calculate the discounted benefit of rehabilitating the armory
Explain failure of internet company : Explain failure of internet company
Design and implementation of business interventions : Design and implementation of business interventions - List and describe four key organizational factors that affect the design and implementation of an intervention.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Tcp connections experience data segment loss

TCP connections experience data segment loss

  Java program to declare an integer array and initializing it

Write down a complete Java program that declares an integer array, intArray, and initialize it to {1, 2, 3, 4, 5, 6, and 7}. The program must have the following methods:1) void displayOddPositions (). This method displays array elements in the odd..

  Write program to calculate pay of different types of employe

Write program to calculate pay of different types of employe

  Provide the different kinds of access protocols

explain an example of the Public Key Infrastructure that would explain the differing usages of symmetric and asymmetric encryption and how these encryption methods might use either a substitution or a transposition cipher.

  What is redundant data and why should it be avoided

What are the advantages of using relational databases in the development of interactive web applications.

  Benefits and negative effects by workplace automation

State at least three advantages and three negative effects brought about by the workplace automation. A multinational corporation transfers a foreign employee to United States on an L-1 visa. The foreign employee is a computer programmer, working ..

  Program that creates basic user interface code

Program that creates basic user interface code

  Note concepts using the osi model as a framework

describe protocols at the different layers of the OSI model and explain their functionality, and identify various hardwarecomponents and network topologies.

  Suppose that screen is an ostream iterator initialized

What is the output of the following program segment? (suppose that screen is an ostream iterator initialized to the standard output device to output elements of the type int.)

  Challenges of internet search

State different challenges of relying over the Internet for your research?In extending a single-system mail system to distributed mail system, state the key additions which should be involved? Discuss in scholarly detail.

  Draft the testing procedures to be used by groover

Draft the testing procedures to be used by Groover Consulting whenever they provide software to their clients. The procedures will be used by Groover Consulting to that the software they are delivering is reliable, accurate, and fault tolerant.

  Make a template for a function called sum

Write down a template for a function called sum. The function should compute and return the sum of values passed in an array. Another argument send into the function should be the array length.

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