ciao salvy ho messo a posto un po' il codice ecco qui
ricordati di mettere il '\0' finale alle stringhe
codice:
#include <iostream>
#define MAXCHAR 10

using namespace std;
char* getChar();

int main()
{
char* y;

y = getChar();
cout << "y = " << y; //Ho paura che il problema sia qui
cout << "\n";

system("pause"); // non si può fare system("\npause")...xD
return 0;
}


char * getChar()
{
int x=0;
static char c[MAXCHAR]; //dichiarando la variabile static lo stack relativo a getChar non viene distrutto
c[0] = '\0';
char buf;
for(int i = 0; i < MAXCHAR - 1/*il -1 c'è xkè serve lo spazio per il NULL*/; i++) //fa in modo che il max numero di caratteri inseriti sia MAXCHAR
    {
    buf = cin.get();     
    if (buf == '\n') //fino a che premi invio il ciclo continua
        break;
    c[x] = buf;
    x++;
    }
c[x] = '\0'; //va messo il '\0' a fine stringa se la crei te carattere per carattere
cout << "c = " << c << endl;
return c;
}