Skip to content

Instantly share code, notes, and snippets.

@shyuan
Created November 10, 2017 06:16
Show Gist options
  • Save shyuan/4f7edbfc07c6be6ffd1c9fe1a9319e52 to your computer and use it in GitHub Desktop.
Save shyuan/4f7edbfc07c6be6ffd1c9fe1a9319e52 to your computer and use it in GitHub Desktop.
A C snippet would cause segmentation fault
#include <stdio.h>
int main()
{
int *ptr = NULL;
printf("%d", *ptr);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment