pwasser[
^] has answered your question perfectly.
Just to add to it since you also mentioned C++.
In C++, you could also do this with a cleaner syntax -
int myfunc(char*& p)
{
p = new char[20];
strcpy(p, "Hello world");
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
char* mypointer = NULL;
myfunc(mypointer);
cout << mypointer << endl;
delete [] mypointer;
return 0;
}