whats wrong with this code
int *mkarray(int a, int b, int c) {
int arr[3];
arr[0] = a;
arr[1] = b;
arr[2] = c;
int *p = arr;
return p;
}
// Code for other_function() omitted.
int main() {
int *ptr = mkarray(10, 20, 30);
other_function();
printf("%d %d %d\n", ptr[0], ptr[1], ptr[2]);
}