当我想运行以下代码时,出现以下错误。
Enter number1
4
Segmentation fault (core dumped)
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *p1;int *p2;
int n;
printf("Enter number1\n");
scanf("%d",p1);
printf("Enter number2\n");
scanf("%d",p2);
printf("sum:%d\n", (*p1 + *p2));
return 0;
}