I'm studying for exams right and i've come across this question:
What is the crucial error in this code?
int *numbers(int a, int b)
  {
     int array[2];
     array[0] = a * b;
     array[1] = a + b;
     return array;
  }
Now, I don't have much C experience but I don't see a crucial error in this code at all. Maybe I'm being a moron and just overlooking something obvious. The only thing I can see is memory hasn't been allocated using malloc but I don't see that a big problem.
Any help is appreciated!
 
     
     
     
    