Re: i know is off of topic, but...
- From: Russell Shaw <rjshaw netspace net au>
- Cc: gtk-list gnome org
- Subject: Re: i know is off of topic, but...
- Date: Tue, 14 Dec 2004 19:08:15 +1100
Mario Motta wrote:
hi all,
someone can tell me why this piece of sw compile and works even if it
should not ?
$ gcc --version
gcc (GCC) 3.3.1 (mingw special 20030804-1)
$ gcc impossible.c -o impossible
======================================================
#include <stdio.h>
int main(int argc, char *argv[])
{
int n,lv;
printf("enter lv:");
scanf("%d",&lv);
int impossible[lv]; // declaring an array without a constant size ?
This is a C89 GNU extension and standard in C99.
for(n = 0; n < lv; n++)
{
impossible[n] = n+10;
printf("\nimpossible[%d] = %d",n,impossble[n]);
fflush(stdout);
}
return 0;
}
TIA
/mario
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]