输出?
null
#include <stdio.h> int main() { int c = 5, no = 10; do { no /= c; } while (c--); printf ( "%d" , no); return 0; } |
(A) 1 (B) 运行时错误 (C) 0 (D) 编译错误 答复: (B) 说明: 上面的程序有一个错误。它进入c=0的do while循环。此外,由于增量是后增量,所以(no/0)将创建一个除以0的错误。所以它在运行时会失败。 这个问题的小测验
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END