Just need a detailed explanation on how the answers were attained.

Dec 16th, 2014
DotaCN
Category:
Computer Science
Price: \$15 USD

Question description

Parameters: What does the following program print?

#include <stdio.h>

void f1(int *a, int *b){

*a += *b;

}

void f2(int *a, int *b){

*a -= *b;

}

void f3(int *a, int *b){

int i;

for (i = 0; i < 3; i++) {

f1(a, b);

printf( a= %i” , *a);

}}

void main () {

int x =6;

int y =2;

int z =7;

f2 (&x, &y);

f3 (&x, &z);

printf( “ \nx=%i, y=%i, z=%i” , x, y, z);

}

a =11 a=18  a=25

x=25  y=2  z=7

(Top Tutor) Daniel C.
(997)
School: New York University

Studypool has helped 1,244,100 students

Review from our student for this Answer

Sigchi4life
Dec 16th, 2014
"Solid work, thanks. "

1829 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors