Implements the void power_ref(int* x, int y)
function that calculates the power of x
leading to y
. The result should be placed in the address indicated in the first parameter, changing its initial value.
I have something like this:
#include <stdio.h>
void power_ref(int* x, int y){
int result = (int) *x ^ y;
*x = result;
printf("result: %d", result);
}