How do I force my code to universally seg fault?

Viewed 4275

I was wondering what the best way would be to reliably segmentation fault a piece of C code?

I'm fully aware that this is bad behavior, and should never be used in a piece of software, but I wanted to know how I could consistantly force it to happen.

EDIT: The answer I got was not what I originally was looking for, but is valuable in understanding why this question doesn't have a reliable answer.

3 Answers
Related