I wrote this incredibly stupid code
#include <stdio.h>
main(){
int new[10], i;
for(i=1; i<=10; ++i){
new[i] = 0;
}
for(i=1;i<=10; ++i)
{
printf("%d", new[i]);
}
}
I compiled this using GCC on Xubuntu and then did the ./a.out. The cursor is just blinking resulting in no output. The same is the case when tried to debug with gdb. It runs and then stays with the blinking cursor.
Any help?
newfor variable names - it's a keyword.newis not a keyword in C.newis not a keyword in c, but in this era it is probably better to avoid using it as a identifier in new (heh!) code, simply because so many c programmers also write c++ and so much c code gets included into c++ projects.