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

  How much physical memory is required

An editor has 100 KB of program text, 30 KB of initialized data, and 50 KB of BSS (Block started by symbol). The initial stack is 10 KB. assume that three copies of this editor are started simultaneously.

  Advantages and disadvantages to using cots

What are the advantages and disadvantages to using COTS (Commercial Off-the-Shelf) software versus writing your own software within a company environment? Give some examples of problems you have had.

  Which applications running in data centers are candidates

What questions wil lbe useful to investigate when deciding which applications running in data centers are candidates for migration to the cloud environment.

  Find user allowed to purchase particular restricted product

I need to create a simple age calculator to find if a user is allowed to purchase a particular restricted product. I need to model an abstract class to represent generic restricted product and concrete classes to represent alcohol, tobacco, R-rate..

  Produce a decision table

Produce a decision table

  Program that will search a file of numbers of type int

Write down  a C++ program that will search a file of numbers of type int and write the largest and the smallest numbers to the screen. The file contains nothing but numbers of type int separated by blanks or line breaks.

  How can the receiver detects the error

UDP uses 1's complement for its checksums. assume you have the following three 16-bit words 0100010001000100, 0101010101010101, 0011001100110011. What is the 1's complement of the sum of these 16-bit words.

  How to change the employee class

design a program, employe_data.cpp, with the Employee class that has two employees; sets their age, yearsOfService, and salary (rounded to the nearest thousands of dollars; and prints their values.

  Make a program that implements the use of an int array

build a Java application that implements the use of an int array. Use 'for' loops to iterate through the array using the array's length variable to stay within the array bounds

  System analysis and design

In the System Analysis and Design: Design Patterns – How widely used are design patterns in today’s development environments.

  How to compute both the average

Write down a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the max..

  What types of relationships that exist between tables

What are the differences between relational database models and object-oriented database models? express at least 2 differences at 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