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
Question 3
prohojiy [21]

The Answer Should Be:

<u>The first thing for you to do when you arrive at an intersection is to stop at the traffic light. Your going to want to listen to the instructions or signals of the traffic Police.</u>

I Hope This Helps? :)

8 0
3 years ago
The presentation ____ determines the formatting characteristics of fonts and colors.
leonid [27]
The presentation theme determines the formatting characteristics of fonts and colors.
6 0
3 years ago
Read 2 more answers
You can use the Trim Video feature to specify a video file’s Start and End time in order to control which portion of the video f
mario62 [17]

Answer:

True

Explanation:

You can trim a video and actually set the start time and end time of a video on Powerpoint (a presentation software by microsoft) by following some simple steps.

select the video and click the playback tab, click the Trim video and a box will pop up, you can play the video and see how it is trimmed, and finally click OK.

5 0
3 years ago
Any computer or device on a network that can be addressed on the local network is referred to as a:
Umnica [9.8K]
<span>Any computer or device on a network that can be addressed on the local network is referred to as a: node.</span>
5 0
3 years ago
Description
lapo4ka [179]

Answer:

from datetime import time, datetime, timedelta, date

for _ in iter(list, 0):

   t1 = input("Please enter time one: ")

   t2 = input("Please enter time two: ")

   if t1.isdigit() == True and (int(t1[:2])<=23 and int(t1[2:]) <= 59)\

       and t2.isdigit() == True and (int(t2[:2])<= 23 and int(t2[2:])<=59):

       time_1 = time(hour=int(t1[:2]), minute=int(t1[2:]))

       time_2 = time(hour= int(t2[:2]), minute=int(t2[2:]))

       if time_1 > time_2:

           diff = datetime. combine (date. today( ), time_1) - datetime. combine(date. today ( ), time_2)

       else:

           diff = datetime. combine (date. today( ), time_2) -datetime. combine(date. today ( ), time_1)

       diff_list = str(diff).split(":")

       del diff_list[2]

       diff_t = "". join (diff_list)

       print(diff_t)

       break        

   if t1.isdigit() == False or t2.isdigit() == False:

       print("Military Time Forest Required: Bad input, try again.")

       continue

   elif int(t1[:2])> 23 or int(t2[:2])> 23:

       print("Military Tine Format Required: Hours must be between 00 and 23, try again")

       continue

   elif int(t1[2:])> 59 or int(t2[2:])> 59:

       print("Military Tine Format Required: Minutes must be between me and 59, try again")

       continue

Explanation:

The python Datetime package is used to manipulate date and time, creating immutable Datetime objects from the various python data types like integer and string. The block of code above is a conditional for-loop statement that gets two user time value inputs and prints out the difference as a string in Military forest time format.

5 0
3 years ago
Other questions:
  • What view is In a presentation program displays your slides in full screen mode
    6·1 answer
  • What technology allows data to be stored in one place and be retrieved by many systems?
    7·1 answer
  • Once Google Analytics processes data, it’s stored in a database where it can’t be modified.
    9·1 answer
  • Two powerboats are about to cross paths. what should the boat on the starboard (right) do?
    11·1 answer
  • Why did latex replace wax?
    7·1 answer
  • Write a programme with C++ language wich print the biggest number in between three numbers , whith INT
    14·1 answer
  • (This is for photography segment exam btw)
    11·2 answers
  • k-means clustering cannot be used to perform hierarchical clustering as it requires k (number of clusters) as an input parameter
    15·1 answer
  • Which of the following is NOT an algorithm?
    15·1 answer
  • Which activity is performed during high-level design in the V-model?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!