Suppose array is declared as int array[200]. And then you call your function like this:
mymalloc(array, 200);
Then the line you just have above will try to do this:
if(array[i+200] != 0) return (int *)0;
Which is clearly wrong and will produce undefined behaviour. What are you trying to do with that line?



2Likes
LinkBack URL
About LinkBacks




12-4)=8. So for 8 we can use the 'pass by address' function calling--