What will be the output of the program? Explain step by step.

b) What will be the output of the program? Explain step by step.
#include<stdio.h>
int main()
{
int arr[5], i=-1, z;
while(i<5)
arr[i]=++i;
for(i=0; i<6; i++)
printf("%d, ", arr[i]);
return 0;
}

Leave a Reply