I would suggest adding code to check the return status of every CUDA API call. It is entirely possible that CUDA failed to initialize, for example due to a driver version mismatch.
You state that you cannot access the device memory, what exactly does that mean? For example, there is no device code that operates on the data pointed to by d_a. The code snippet above does not seem to have any obvious problems.
Device and host (system) memory are different address spaces. You cannot dereference a pointer to device memory in host code. Likewise you cannot dereference a pointer to host memory in device code. There are ways of mapping host memory into the memory space of the device, but that is an advanced CUDA programming topic.
I would suggest reading the relevant sections of the CUDA C Programming Guide, or an introductory text, such as “CUDA by Example”.