Explain the difference between stack and heap memory allocation.
For this coding exercise, classify each simplified C or C++ declaration as "stack" or "heap". Treat declarations containing malloc, calloc, realloc, or the C++ new operator as heap allocations. Treat all other expressions, including empty strings, as stack allocations.
Implement classify_allocations(expressions), where expressions is a list of strings. Return a list of labels in the same order.
def classify_allocations(expressions):