i know is off of topic, but...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ?
for(n = 0; n < lv; n++)
  {
    impossible[n] = n+10;
    printf("\nimpossible[%d] = %d",n,impossble[n]);
    fflush(stdout);
  }
return 0;
}

TIA

/mario


_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux