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
stich3 [128]
3 years ago
6

Write the definition of a function named swapints that is passed two int reference parameters. The function returns nothing but

exchanges the 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:
Alja [10]3 years ago
3 0

Answer:

void swapints(int *j,int *k)//Function definition.

{

   *j=*j+*k-(*k=*j); //value swapping.

}

swapints(&j,&k);//call the function.

Explanation:

  • The above function definition takes the address of j and k variables which is stored on the pointer variable j and k.
  • Then the pointer variable uses the j and k value for the above expression, and the user does not need to return the value of j and k.
  • But when the user prints the value of the j and k variable, then he gets the swapping value of the j and k variable.
  • The user needs to know that the "int j" is a normal variable, but "int *j" is a pointer variable that is used to take the address of j variable.
You might be interested in
the corrective actions you need to perform on a computer in case it functions in an unexpected manner is called what
Vadim26 [7]
These actions are called troubleshooting. One of the first ones would be to save your work, if you can, close all open programs and then shut down your computer (not restart). Wait a couple if minutes, start and see if the problem has been alleviated.
5 0
4 years ago
How does an individual's access to a wide range of online services affects their ability to operate safely in the digital world.
S_A_V [24]
Nothing online is safe anymore!!!! People and even the government can get hacked easily with today's technology.You can search someone easily on websites like Google or Facebook and even read someone's tweets on Twitter because their account is not private. But what's the point of saying private if they can easily get hacked by someone. There is no safety these days that is why you have to be careful with what you post on the internet in general.
6 0
3 years ago
Which from the following list are an example of productivity software?
Scorpion4ik [409]
D. All of the Above.....
3 0
4 years ago
Read 2 more answers
Complete the sentence.<br> Python is a_____<br> level language compared to bytecode.
Crazy boy [7]

Answer:

High

Explanation:

Python is high level; Bytecode is intermediate

5 0
3 years ago
Read 2 more answers
i want to write a program that display that pattern *********** *********** *********** *********** *********** *********** ****
kodGreya [7K]
Im sorry, but for me to answer the question, I need the full question
4 0
4 years ago
Other questions:
  • Which passage form the passage best contributes to elisa impatient tone
    8·1 answer
  • what’s The abbreviation of afk and what does That Mean in gaming playing in Multiplayer online battle arena games
    10·1 answer
  • Will upvote!
    12·1 answer
  • Why does hamlet want to kill himself and what stops him from doing that?
    10·1 answer
  • A collection of related files that serves as a foundation for retrieving information is a: byte
    12·1 answer
  • Akira has trouble reading what is on the computer screen and sometimes seeing pictures on websites. As her friend, you explain t
    8·1 answer
  • Select the correct answer. One of the functions of a data warehouse is to change table names to meaningful names. Which name is
    13·1 answer
  • 2. Using the Enhanced for Statement, write an application that uses an enhanced for statement to sum the double values passed by
    6·1 answer
  • A macro enables you to automate repetitive tasks by
    5·1 answer
  • The February Revolution occurred in January.<br><br><br> True<br> False
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!