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
Firdavs [7]
3 years ago
8

Write the definition of a function named swapints that is passed two int variables. The function returns nothing but exchanges t

he values of the two variables. So, if j and k have (respectively) the values 15 and 23, and the invocation swapints(j,k) is made, then upon return, the values of j and k will be 23 and 15 respectively.
Computers and Technology
1 answer:
lisov135 [29]3 years ago
4 0

Answer:

Following are the program in the C++ Programming Language.

#include <iostream>

//header file

using namespace std;

 //using namespace

void swapints(int &j, int &k){

 //definition of the function

int temp;

temp = j;

j = k;

k = temp;

}

// function declaration

void swapints(int &j, int &k);

int main() {

  // local variable declaration:

 int j = 15;

 int k = 23;

 std::cout << "Before the swapping, value of j : "<<j<<endl;

 std::cout << "Before the swapping, value of k : "<<k<<endl;

  /* calling a function to swap the values using variable reference.*/

 swapints(j, k);

 std::cout << "After the swapping, value of j : "<<j<< endl;

 std::cout << "After the swapping, value of k : "<<k<< endl;

 

  return 0;

}

Output:

Before the swapping, value of j : 15

Before the swapping, value of k : 23

After the swapping, value of j : 23

After the swapping, value of k : 15

Explanation:

Here, we define the header fine and namespace <iostream> and "std".

Then, we define a function named "swapints()" and pass two reference variables in parameter.

Then, inside the function, we perform the codes of swapping.

Then, we define the main() function inside it we define two integer variable "j" and "k" assign value "j" to 15 and "k" to 23 and print both the variables.

Then, inside main() function we call the function "swapints()" and pass value to its parameters.

You might be interested in
For this project, you have to write 3 functions. C++
JulsSmile [24]

Find the given attachments

4 0
4 years ago
(true/false) In a layered operating system design, requests (such user processes may need to interact with multiple layers, resu
Julli [10]

Answer:

The correct answer to this question is "true".

Explanation:

In a layered operating system, all the layers defined individually and communicate with each other when required. It is also easier to create, manage and update the system. If we change in one layer. The Changement has done in only a specific layer it does not affect any other layers. In this operating system, there are 6 layers.

In the monolithic system. It works on the kernel space. That increases the size of the operating system and kernel. It is different than the microkernel system. In the monolithic system, there are 3 layers.

If we assign any work to both, So the 6 layers will take more time to do that work. when that 3 layers take less time to do that work.

that's way layered operating performance is slower than the monolithic system.

6 0
4 years ago
why when I click apostrophe I get an accent mark? And when I try quotation marks I get this ( ¨ ) how do I change that or why is
faltersainse [42]

Answer: it's probably how your computer is set up . I would try going into settings and seeing if you can fix it

Explanation:

5 0
4 years ago
To permit electrical energy to be sent over long distances at high voltage, then reduced to a lower voltage for everyday use, wh
AVprozaik [17]
High-voltage direct current
7 0
3 years ago
Read 2 more answers
Which type of input devices used in big hero 6 movie
Maslowich

The  Input Devices Used in Movie Big Hero are:

  • A joystick
  • medical robot
  • Armored exoskeleton
  • Jet-boots.

<h3>What are input device?</h3>

This is known to be a is a piece of instrument that helps gives or provide data to any information processing system.

Note that the Input Devices Used in Movie Big Hero “6”  are  a medical robot made by by Tadashi Hamada., Armored exoskeleton and others.

Learn more about input device from

brainly.com/question/24455519

#SPJ1

7 0
2 years ago
Other questions:
  • Branching is so called because <br>​
    5·2 answers
  • In the 21st century organization we will see:
    10·1 answer
  • If you increase or decrease the font size of one shape, the font size in other shapes will not be affected. True False
    14·1 answer
  • Consider a classStudent. The following code is used to create objects and access its member functions. Which statement is true a
    6·1 answer
  • Consider the problem of finding the distance between the two closest numbers in an array of n numbers. (The distance between two
    13·1 answer
  • The _______________ database structure is considered one of the key technologies of a new generation of Web-based applications.
    7·1 answer
  • Write a program that gets a single character from the user. If the character is not a capital letter (between 'A' and 'Z'), then
    15·1 answer
  • In your opinion, why did Proponents<br>of IPs used IPV6 instead of IPv5​
    7·1 answer
  • The online underground is used _____. Select 3 options. by law-abiding citizens only on Black Friday for networking by criminal
    11·1 answer
  • A penetration tester is experimenting with Network Mapper (Nmap) on a test network as a privileged user. The tester would like t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!