12345678910



Question 1: What will be output if you will compile and execute the following c code?


#include<stdio.h>
int main(){
int array[3]={5};
int i;
for(i=0;i<=2;i++)
printf("%d ",array[i]);
return 0;
}

1. 5 garbage garbage
2. 5 0 0
3. 5 null null
4. Compiler error