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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Today is the anniversary of me being on yet, i don't need it anymore! here's a picture of my dog wearing a bowtie! my question is, how do i delete my account?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
You know the right answer?
Starter Code: #include
void swapIncre(int*, int*, int*);
int main( ) {
int a, b,...
Questions
question
Mathematics, 31.08.2019 00:30
question
English, 31.08.2019 00:30
Questions on the website: 13722367