Consider the function definition: void function6( int& num1, double num2) { } num1 = num1 * 2; num2 = num1 + 3.5; What will display after the execution of the following statements? int num1 = 10; double num2= 1.1; function6(num1, num2); function6(num1, num2); cout << num1 << ''<< num2; O 1. 10 13.5 O 2. 10 1.1 O 3. 40 13.5 O 4. 40 1.1

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 10SA: Why do you need to include function prototypes in a program that contains user-defined functions?...
icon
Related questions
Question

​​​​​​​c++​​​​​​​

 
Consider the function definition:
void function6( int& num1, double num2)
{
}
num1 = num1 * 2;
num2 = num1 +3.5;
What will display after the execution of the following statements?
int num1 = 10;
double num2= 1.1;
function6(num1, num2);
function6(num1, num2);
cout << num1 << ' '<< num2;
O 1. 10 13.5
O 2. 10 1.1
O 3. 40 13.5
O 4. 40 1.1
Transcribed Image Text:Consider the function definition: void function6( int& num1, double num2) { } num1 = num1 * 2; num2 = num1 +3.5; What will display after the execution of the following statements? int num1 = 10; double num2= 1.1; function6(num1, num2); function6(num1, num2); cout << num1 << ' '<< num2; O 1. 10 13.5 O 2. 10 1.1 O 3. 40 13.5 O 4. 40 1.1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning