关于指针问题
#include<stdio.h>int main()
{
int a,b *pa,*pb;
*pa=&a,*pb=&b;
scanf("%d%d",pa,pb);
if(*pa>*pb)
printf("%d",*pa);
else
printf("%d",*pb);
}
为什么出现illegal indirection 警告呢 一运行就未响应
#include <stdio.h> int main(int argc, char *argv[]) { int a, b; int *pa, *pb; pa = &a; pb = &b; scanf("%d%d", pa, pb); if(*pa > *pb) { printf("%d", *pa); }else { printf("%d", *pb); } }