每当我尝试运行我的代码时,弹出窗口即将告知program.exe已停止工作。Code :: Blocks错误.exe已停止工作
#include<stdio.h>
#include<stdlib.h>
int main()
{
char D[10];
for(int i; D[i]!='\0';i++)
scanf("%c",D);
for(int i; D[i]!='\0';i++)
printf("%c",D);
return 0;
}
这里是多了一个,这是造成相同的错误
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr= (int*)1000;
printf("%d %d ",ptr,*ptr);
ptr=ptr+1;
printf("New Value of ptr : %u",ptr);
printf("%d %d ",ptr,*ptr);
return 0;
}
你可以发布代码吗?如果我们无法看到代码,那么我们有点难以确定问题所在。编辑问题以包含它。 – GrandMasterFlush
https://drive.google.com/file/d/0B-QBwnCjr6U9ZzR4ODc2NzdlYW8/view?usp=sharing –
@GrandMasterFlush下面是另一个代码中同样错误的屏幕截图。 https://drive.google.com/file/d/0B-QBwnCjr6U9Z3BwLWpaU1JGZEk/view?usp=sharing –