subject

Starter Code: #include
void swapIncre(int*, int*, int*);
int main( ) {
int a, b, c;
// Input three integers
scanf("%d %d %d", &a, &b,&c);
while(a != -1) {
printf("Original inputs: a:%-4d b:%-4d c:%-4dn", a, b, c);
swapIncre(&a,&b,&c); //pass the reference to thevariable
printf("Rearranged inputs: a:%-4d b:%-4d c:%-4dnn", a, b, c);
//read again
scanf("%d %d %d", &a, &b,&c);
}
}
void swap(int *x, int*z){
}
void swapIncre(int *x, int *y, int *z){ //receive the referenceto variable as pointer
int temp = *x;
*x = *z;
*z = temp;
*y *= 2;
}
Modify program lab5A. c, by defining a new function void swap (...) which swaps the values of a and c. This function should be called in function swapIncre. Specifically, swap Incre ( ) only increases the value of b, and delegates the swapping task to swap ( ) . Show transcribed image text Modify program lab5A. c, by defining a new function void swap (...) which swaps the values of a and c. This function should be called in function swapIncre. Specifically, swap Incre ( ) only increases the value of b, and delegates the swapping task to swap ( ) .

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:00, Dvrsug8598
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, LuvIsRage2
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
image
Computers and Technology, 24.06.2019 07:20, djs1002
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience. ob. add presenter's notes to each slide. oc. add a video to each slide. od. save her slide presentation to a flash drive
Answers: 2
image
Computers and Technology, 24.06.2019 15:00, mbede002
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
You know the right answer?
Starter Code: #include
void swapIncre(int*, int*, int*);
int main( ) {
int a, b,...

Questions in other subjects:

Konu
Chemistry, 24.03.2021 21:20
Konu
Mathematics, 24.03.2021 21:20
Konu
Mathematics, 24.03.2021 21:20