How transfer a array created in one function?

All greetings!

How correctly to transfer a array created in one function in another? I try to make that that of type such:

extern “C” void
Функция1 (const int argc, const char ** argv)
{
float *d_Mas1;
CUDA_SAFE_CALL (cudaMalloc ((void **) d_Mas1, TimeOfModeling * sizeof (float)));
}

extern “C” void
Функция1 (const int argc, const char ** argv)
{
float *d_Mas2;
CUDA_SAFE_CALL (cudaMalloc ((void **) d_Mas2, TimeOfModeling * sizeof (float)));

CUDA_SAFE_CALL (cudaMemcpy (d_Mas2, d_Mas1, sizeof (float) *TimeOfModeling, cudaMemcpyDeviceToDevice));
}

But the question in that that Mas1 is declared as local, visible only as Function 1, whether it is possible to declare it as global and to make its visible for Function 2 ?