Programming Languages
C
Objective
Mar 08, 2013
What will be output of the following c code?
void main()
{
int array[3]={5};
int i;
for(i=0;i<=2;i++)
printf("%d ",array[i]);
}
Detailed Explanation
Storage class of an array which initializes the element of the array at the time of declaration is static. Default initial value of static integer is zero.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts