Closed. This question is off-topic. It is not currently accepting answers. Learn more。
想改进这个问题吗?Update the question所以堆栈溢出的值小于aa>。
四年前关闭。
我找不到这个程序的正确输出。它给出了运行时错误。
想改进这个问题吗?Update the question所以堆栈溢出的值小于aa>。
四年前关闭。
我找不到这个程序的正确输出。它给出了运行时错误。
#include <stdio.h>
int main()
{
int c = 5, no = 10;
do {
no /= c;
} while(c--);
printf ("%d\n", no);
return 0;
}
最佳答案
是零除法。由于在循环计数器中使用后减量c
,因此它在上一次迭代中变为0
。
关于c - 谁能解释为什么这段代码给出了运行时错误? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29153090/