Hi,
i tried to compile the below program
1st program
Code:int main()
{
int i=10;
int a[2]={i,i+1};
printf ("hai %d\n",a[0]);
return 0;
}
2nd program
Why i am able to compile first program and getting compile error for second program?Code:int main()
{
int i=10;
int j=2;
int a[j]={i,i+1};
printf ("hai %d\n",a[0]);
return 0;
}