编程出错,帮忙解决好吗,谢谢
#include<stdio.h>main()
{int b[51],i,n=1,p,*q=b+1;
scanf("%d",q);
while(*q>-1){q++;n++;scanf("%d",q);}
p=1;
for(i=2;i<=n;i++)if(*(b+i)>*(b+p))p=i;
printf("p=%2d,b[%1d]=%3d\n",p,p,*(b+p));}输入7空格8空格5空格4空格6空格7空格9空格10空格3空格2空格0空格4空格-1回车,结果为什么是乱码?