blob: 072904b6da944430693f984917530d1c4aab0ac6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <stdio.h>
#include <string.h>
void crashFunction()
{
char *nullString = NULL;
printf("Now the program will crash!\n");
if (strcmp(nullString, "A string to compare with") == 0) {
printf("How come?! It had to crash!\n");
}
}
int main(int argc, char *argv[])
{
crashFunction();
return 0;
}
|