Dynamic Array allocation (ANSI C)

#include<stdio.h>intmain(){inti,j,k;scanf("%d",&i);inta[i];for(j=0;j<i;j++)scanf("%d"... #include <stdio.h>

int main()
{
int i,j,k;
scanf("%d", &i);

int a[i];

for (j = 0;j < i;j++)
scanf("%d",&a[j]);

for (k = 0;k < i;k++)
printf("%d\n", a[k]);

return 0;
}

I currently got it compiled successfully by GCC 4.0 under Mac OSX. But I just wonder can it get through using Turbo C or other compiler on Windows?

(This piece of code are depicted in ANSI C)

I mean that this piece of source code can be correctly compiled by GCC4.0
Here are my system specs and configurations:
System:Mac OSX 10.4.9
IDE: Xcode 2.4.1,
Project: Command Line Utility--S tandard Tool written it C
Could you please tell me WHY is it that it encountered errors with VC++ 6.0(WINDOWS) while it is OK when i use GCC.
展开
 我来答
ccc365ccc
2007-03-24 · TA获得超过391个赞
知道小有建树答主
回答量:423
采纳率:0%
帮助的人:440万
展开全部
It also get through using by Dev-C++ on Windows!

Are you English?

我(my)这里的机器(computer)没有装(not install)VC++,所以(so)不能帮你看了哈(sorry)~
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式