S
sahu
hello everyone here's some doubt for me as it came in my test n i i got
it wrong by the lecturer.
we all know in static allocation first of all we have to specify the
declaration of spaces in arrays then how did the foll. program print 0
1 2 3 4 5 instead of 0 1 2 3 4.
the logic routine is like this:
int a[5],i;
for(i=0;i<=5;i++)
{a=i;
}
so can anybdy tell why is it. the compiler used was tc.whether it
is takin the junk value to be printed as 5 or what pls do answer.
thanks to everyone in the grp.
it wrong by the lecturer.
we all know in static allocation first of all we have to specify the
declaration of spaces in arrays then how did the foll. program print 0
1 2 3 4 5 instead of 0 1 2 3 4.
the logic routine is like this:
int a[5],i;
for(i=0;i<=5;i++)
{a=i;
}
so can anybdy tell why is it. the compiler used was tc.whether it
is takin the junk value to be printed as 5 or what pls do answer.
thanks to everyone in the grp.