What is the output of the given program

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

What is the output of the following program?

#include <iostream>
using namespace std;
int x;
void summer(int&, int);
void fall(int, int&);

int main()
{
int intNum1 = 2;
int intNum2 = 5;
x = 6;

summer(intNum1, intNum2);
cout << intNum1 << " " << intNum2 << " " << x << endl;

fall(intNum1, intNum2);
cout << intNum1 << " " << intNum2 << " " << x << endl;
return 0;
}
void summer(int& a, int b)
{
int intNum1;
intNum1 = b + 12;
a = 2 * b + 5;
b = intNum1 + 4;
}
void fall(int u, int& v)
{
int intNum2;
intNum2= x;
v = intNum2 * 4;
x = u - v;

}

Reference no: EM131267242

Questions Cloud

Write menu-driven program that make coffee shop operational : The cost of one small cup is $1.75, one medium cup is $1.90, and one large cup is $2.00. Write a menu-driven program that will make the coffee shop operational.
List the six fundamental forms : The study lists six fundamental forms that communicate trustworthiness of an Internet store. List the six fundamental forms. Explain what fulfillment means and what the five components of fulfillment are according to the eCommerce Trust Study above. ..
Write a c program that will malloc up space dynamically : Write a C program that will malloc up space dynamically. The space should be able to hold exactly one integer value. After the space has been reserved, you should deposit the number 6 into the space. After the number 6 has been deposited into the spa..
What is the output of the given program : What is the output of the following program? summer(intNum1, intNum2); cout
What is cis complex numbers : What is cis (Complex Numbers). Give me the exact formula of shortest distance.  Tips how can i stove a problem in few seconds.
Describe your network design strategy that supports design : Describe your network design strategy that supports your design (why you choose such design and what are the advantages of your design).
Design the functions and call them in main : Design the functions and call them in Main - his function asks the user to enter the student ID, Quiz, Test, Recitation, Final scores etc and prints them in a file "Stu_score.txt". This functiion returns the number of students in the class.
Discuss process you went through to select appropriate data : Discuss the process you went through to select the appropriate data types, primary and foreign keys, and other constraints that are necessary to maintain the integrity of the database.

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