#includevoidone(int * ptr_a, int * ptr_b); voidtwo(int * ptr_a, int b, int * ptr
ID: 3660449 • Letter: #
Question
#includevoidone(int * ptr_a, int * ptr_b); voidtwo(int * ptr_a, int b, int * ptr_c); voidthree(int a, int b, int c); int main() {int x = 0, y = 0, z = 0; printf("%d ,%d %d ", x, y, z); one(&x,&y); printf("%d ,%d %d ", x, y, z); two(&x,y,&z); printf("%d ,%d %d ", x, y, z); three(x, y, z); printf("%d ,%d %d ", x, y, z); two(&z,y,&x); printf("%d ,%d %d ", x, y, z);} void one (int * ptr_a, int * ptr_b) {printf("Enter a number: "); scanf("%d", ptr_a); //Notice: No '&' here printf("Enter another number: "); scanf("%d", ptr_b); //Notice: No '&' here} void two(int * ptr_a, int b, int * ptr_c){ b = b + 1; *ptr_c = *ptr_c - 1; *ptr_a = b + *ptr_c;} void three(int a, int b, int c) {a = b - c; b = c - a; c = a - b; printf("%d %d %d ", a, b, c); }Explanation / Answer
output: 0 0 0 Enter a number: //give input as 1 here 1 Enter another number: //give input as 5 here 5 ......... similar output runs where it reads and prints as per code
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.