I know this is probably a basic question, but i've never fully grasped the whole pointers concept in C.
My question is, say i have an int array and I pass that into a function like `
int main(){
int *a = malloc(sizeof(int*)*4);
// add values to a
p(a);
}
void p(int *a){
int *b = malloc(sizeof(int*)*4)
b = a;
// change values in b
//print a b
}`
What is the correct way to do this so that whatever changes I make to b do not affect the values in a?