How to declare a __device__ arry in device func

//kernel.cu

typedef struct stu_t

{

  int age;

  char *name;

  struct stu_t *pn;

}stu;

__device__ stu_t sn[64];

__device__ int d_arr[1024];

__global__ void kernel()

{

  unsigned int tid = threadIdx.x;

  d_arr[tid] = tid;

  sn[tid].age = tid;

 Â int g_arr[1024];

}

1.Is this right?

2.And where the sn[64], d_arr[1024] and g_arr[1024] reside, global memory or register …?

3.What are the differences?

4.What are the max size of them?

Urgently need your help.