Hello Everyone i am currently working on a project related to dsk6713.I have to do dynamic memory allocation in my program for which i use malloc() in my code for initializing three different pointers such as.
int n; //where n is some computed value
short *x;
short *y;
short *z;
x=(short *)malloc(n*sizeof(short));
y=(short *)malloc(n*sizeof(short));
z=(short *)malloc(n*sizeof(short));
problem is when i started to compute x as.
for(int i=0;i<somevarible;i++)
{
x[i]=some array ;
}
the value storage in x also comes automatically in y and z by which i conclude that all three pointers x,y,z points to same memory location in proccessor i need help in how to initialize these pointer such that they points to three different memory location thanks in advance...