[Login|Register]
New post

Show post

Search forum

Read post
easy or not [ Topic ] 2011-09-16 16:51:56 Red_Alert
以下代码运行很对,为什么总是runtime error呢
#include <stdio.h>
int main()
{
    char c[10000000];//保存字符的数组
    int i,j;//i为输入统计,j为输出标记
    for(i=0;(c[i]=getchar())!=EOF;i++);//输入失败则结束
    for(j=0;j<i;j++)
        putchar(c[j]);//输出
    return 0;
}
Reply
Title
Message
(64K)
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 1.8ms with 2 query(s).