Home>
# include<stdio.h>
    #define MAX_MSGSIZE 100
    #define BUF_SIZE 10
    #define BUF_LENGTH 100
    char * create_cache ();
    int main (int argc, char * argv []) {
        char * Cache [BUF_SIZE];
        Cache = create_cache ();
        printf ("address is:% s \ n", Cache [0]);
        return 0;
    }
    char * create_cache () {
        char * cache [BUF_SIZE];
        for (int size = 0;size<BUF_SIZE;++ size) {
            char buffer [BUF_LENGTH] = "i";
            cache [size] =&buffer [0];
        }
        return cache;
    }

When I compiled the above code, I got the following error:

./ main_test.c: In function ‘main’:
./main_test.c:16:11: error: assignment to expression with array type
     Cache = create_cache ();
           ^
./main_test.c: In function ‘create_cache’:
./main_test.c:28:12: warning: return from incompatible pointer type [-Wincompatible-pointer-types]
     return cache;
            ^ ~~~~

I'm unfamiliar with the handling of pointer-type functions. How can I solve it?
I would appreciate your professor.