analyze each program and figure out what is wrong with the memory management in the code and how to fix the code. #include #include #include #include const int SIZE = 10; int * myfunction() { int...


analyze each program and figure out what is wrong with the memory management in the code and how to fix the code.


#include
#include
#include
#include


const int SIZE = 10;


int *
myfunction() {
int array[SIZE];
for (int i = 0; i< size;="" i++)="">
array[i] = 0;
}
return array;
}


int
main(int argc, char *argv[])
{
int *p = myfunction();
for (int i=0; i
printf("%d: %d\n", i, p[i]);
}


return 0;
}




Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here