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, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
What was the advantage of using transistors instead of vacuum tubes in the second-generation computers? a. computers were drastically reduced in size. b. computers no longer produced errors. c. computers became affordable. d. computers could run on electricity.
Answers: 1
question
Computers and Technology, 25.06.2019 10:40
If you're using the paintbrush tool and want to change the color of the paint being used what should you change
Answers: 1
You know the right answer?
Starter Code: #include
void swapIncre(int*, int*, int*);
int main( ) {
int a, b,...
Questions
question
Mathematics, 14.04.2020 23:20
question
Mathematics, 14.04.2020 23:20