edited by
12,077 views
35 votes
35 votes

The output of the following C program is_____________.

void f1 ( int a, int b)  {  
                int c; 
                c = a; a = b;
                 b = c;  
}   
void f2 ( int * a, int * b) {   
               int c; 
               c = * a; *a = *b; *b = c; 
} 
int main () { 
        int a = 4, b = 5, c = 6; 
        f1 ( a, b); 
        f2 (&b, &c); 
        printf ("%d", c - a - b);  
 }
edited by

5 Answers

Answer:

Related questions

65 votes
65 votes
12 answers
2
31 votes
31 votes
2 answers
3