int main(void)
{
int a[4];
a[0] = a[0] + 1;
printf("%i\n",a[0]);
}
I am working on an assignment as a part of which I needed to do something like the one above. What I need is I am basically trying to increment a value(or some value ) to the array , which is just declared before, with no value assigned.
But the problem is when I run this code I get weird results. For instance the output of the above snippet I get is 1723787569 and it gets changed whenever I execute it next time. Can anyone explain what mistake am I doing ?