#include <stdio.h>
void addConst(int* , int*);
int main(){
int x = 2, y = 4;
printf("Before function call x = %d y = %d\n\n", x , y);
printf("The function adds 3 to x and 6 to y indirectly by using the ");
printf("addresses of the variables.\n");
addConst(&x, &y);
printf("After function executed x = %d y = %d\n",x,y);
return 0;
}
void addConst(int* x, int* y){
*x = *x + 3;
*y = *y + 6;
}