I am using Ubuntu 12.04 LTS. I wrote a simple program as follows to create crash
// null.c #include int main() { int *p = NULL; int k=*p;
Your real question appears to be not "where is my core dump", but rather "how can I modify /proc/sys/kernel/core_pattern".
/proc/sys/kernel/core_pattern
sudo bash -c 'echo core.%e.%p > /proc/sys/kernel/core_pattern'
should do the trick.