NVIDIA Interview Question

As a developer how would you prevent segmentation fault.