#include <iostream>
int main() {
// behold, the power of dereferencing!
int *p = (int *)0x0;
printf("%d\n", *p); // causes a crash, because the pointer points to memory that we didn't allocate!
return 0; // return code won't be 0 .. we never got here.. -11 means SIGSEGV (segmentation violation)
}
To embed this project on your website, copy the following code and paste it into your website's HTML: