#include using namespace std; void fun1(int &x, int &y); int main() { } void { } int i = 3; int num[5] = {2,4,6,8,10}; fun1(num[i], i); fun1(i, i); return 0; fun1(int &x, int &y) X = 99; y = 3;

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question

Using the image below answer the following:

What are the values of the nums array and the variable i at the end of the following program?

#include <iostream>
using namespace std;
void fun1(int &x, int &y);
int main()
{
}
void
{
}
int i = 3;
int num[5] = {2,4,6,8,10};
fun1(num[i], i);
fun1(i, i);
return 0;
fun1(int &x, int &y)
3;
X = 99; y
=
Transcribed Image Text:#include <iostream> using namespace std; void fun1(int &x, int &y); int main() { } void { } int i = 3; int num[5] = {2,4,6,8,10}; fun1(num[i], i); fun1(i, i); return 0; fun1(int &x, int &y) 3; X = 99; y =
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Reference Types in Function
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT