C Programming :: Arrays - Discussion
Home > C Programming > Arrays > MCQs Questions Discussion
27 / 55
What is the output of the following 'C' program ?
#include<stdio.h>
#define TOTAL_ELEMENTS sizeof(array)/sizeof (array[0])
int array[] = {23,34,12,17,204,99,16};
int main()
{
int d;
for(d = 0; d <= TOTAL_ELEMENTS; d++)
printf("%d ",array[d]);
return 0;
}
#include<stdio.h>
#define TOTAL_ELEMENTS sizeof(array)/sizeof (array[0])
int array[] = {23,34,12,17,204,99,16};
int main()
{
int d;
for(d = 0; d <= TOTAL_ELEMENTS; d++)
printf("%d ",array[d]);
return 0;
}
A23 34 12 17 204 99 16 0
B23 34 12 17 204 99 16
C0 0 0 0 0 0 0
DCompilation Error
ENone of these
Answer: Option (Login/Signup)
Show Explanation