1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
muminat
2 years ago
13

Given the following function definition

Computers and Technology
1 answer:
siniylev [52]2 years ago
3 0

Answer:

B. 1 6 3

Explanation:

Given function definition for calc:

void calc (int a, int& b)

{

int c;

c = a + 2;

a = a * 3;

b = c + a;

}

Function invocation:

x = 1;

y = 2;

z = 3;

calc(x, y);

cout << x << " " << y << " " << z << endl;

  • Since x is passed by value, its value remains 1.
  • y is passed by reference to the function calc(x,y);

Tracing the function execution:

c=3

a=3

b=c+a = 6;

But b actually corresponds to y. So y=6 after function call.

  • Since z is not involved in function call, its value remain 3.

So output: 1 6 3

You might be interested in
Wireless networks usually use ____ signals to send data.
barxatty [35]
<span>Wireless networks usually use radio (b) signals to send data. </span>
6 0
2 years ago
Read 2 more answers
Blind spots are those areas not reflected in your:
bulgar [2K]
The answer is C because your sideview and rearview mirrors are there specifically to check behind you, while the vanity mirror is not supposed to be used for the same purpose.
8 0
3 years ago
Read 2 more answers
6 The part of the computer that contains the brain or central processing unit is also known as the ?
Olin [163]
Answer:  "CPU" .
________________________________
4 0
3 years ago
How many inputs are included in the following requirement? REQUIREMENT: Write a program that asks the employee for their age. Th
wolverine [178]

Answer:

The correct answer for the given question is 1

Explanation:

Following are the program in c language  

#include<stdio.h> // header file

#include<conio.h>  //header file

void main()  // main method

{

int age,retiredAge;  // variable

clrscr();  // clear screen

printf("Enter Age : ");

scanf("%d",&age);  // input age

printf("************************");

retiredAge = (65-age);  // calculating retired age

printf("\nYour Age is %d",age);

if(retiredAge<0)  // checking condition

{

printf("\nYou are already cross the retired age. Or Enter Invalid Age.");

}

else

{

printf("\nNo of Years Left to retired is %d",retiredAge);  // dsiplay age

}

getch();

}

Output:

Enter Age : 50

************************

Your Age is 50

No of Years Left to retired is 15

Here Age is the only required input to calculate the retirement age of employee. if entered age is greater than 65 then a message is printed " You are already cross the retired age. Or Enter Invalid Age. " if entered age is valid then retiredAge is calculated with the formula retiredAge = (65-age). and finally display the age,followed by the number of years left to retirement.

Therefore  1 input are required for the above program.

4 0
2 years ago
____ contain instructions for the OS for hardware devices, such as the keyboard, mouse, and video card, and are stored in the sy
AnnyKZ [126]

The Motherboard contains instructions for the OS for hardware devices, such as the keyboard, mouse, and video card, and are stored in the systemroot\Windows\System32\Drivers folder.

Learned this in middle school, your welcome ;)

3 0
3 years ago
Other questions:
  • You are working on an excel table and realize that you need to add a row to the middle of your table. what is one way to do this
    12·1 answer
  • Effective presentations vary the color scheme on each slide.<br><br> True<br> False
    5·2 answers
  • Explain each of the three important concepts behind the Federal Networking Council's definition of the term Internet. Explain ho
    8·1 answer
  • Which of the following are tasks you can
    12·2 answers
  • 22
    15·1 answer
  • Need answer ASAP. I’ll mark brainliest if correct
    7·1 answer
  • What is the output of the following code:
    12·1 answer
  • it is good to know and use the npsd framework while solution envisioning as part of the value discovery cycle. What is NPSD?
    10·1 answer
  • At the heart of every computing device is a(n) _______________, which is usually a single, thin wafer of silicon and tiny transi
    12·1 answer
  • Refers to the capacity to form bonds with particular
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!