What will be output after compilation and execution of the following code?

1.2 What will be output after compilation and execution of the following code?
#include<stdio.h>
int main(){ int array[3]={5}; int i;
for (i=0;i<=2;i++)
printf("%d ",array[i]); return 0;}

A) 5 garbage garbage
B) 5 0 0
C) 0 0 0
D) 5 5 5

Leave a Reply