#include <stdio.h>

void echange (int* x, int* y ); 
void ajouteUn (int x); 
void ajouteDeux (int* x); 
void ajouteTrois (int x, int* y); 

int main() 
    { 
    printf("\t\ta\tb\tc\td\n");
    int a=1, b=2, c=3, d=4; 
    printf("avant 1\t\t%d\t%d\t%d\t%d\n",a,b,c,d);
     
     echange(&a,&b); echange(&c,&d); /*1*/ 
    printf("après 1\t\t%d\t%d\t%d\t%d\n",a,b,c,d);
     ajouteUn(a); ajouteDeux(&b); /*2*/ 
    printf("après 2\t\t%d\t%d\t%d\t%d\n",a,b,c,d);
     ajouteTrois(c, &d); /*3*/ 
    printf("après 3\t\t%d\t%d\t%d\t%d\n",a,b,c,d);
     echange(&a, &d); /*4*/ 
    printf("après 4\t\t%d\t%d\t%d\t%d\n",a,b,c,d);
} 
void echange (int* x, int* y) 
    { 
     int temp; 
     temp=*x; 
     *x=*y; 
     *y=temp; 
} 
void ajouteUn (int x) 
    { 
     x = x + 1; 
} 
void ajouteDeux (int* x) 
    { 
     *x = *x + 2; 
} 
void ajouteTrois (int x, int* y) 
    { 
     x = x + 3; 
     *y = *y + 3; 
} 

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: