What is the output for a 64-bit Compiler?
C
# include <stdio.h>
void print(int arr[])
{
int n = sizeof(arr)/sizeof(arr[0]);
int i;
for (i = 0; i < n; i++)
printf(\"%d \", arr[i]);
}
int main()
{
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8};
print(arr);
return 0;
}
(A)
1, 2, 3, 4, 5, 6, 7, 8
(B)
Compiler Error
(C)
1 2
(D)
Run Time Error
Answer: (C)
Explanation:
The output will be 1 2.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Last Updated :
14 Mar, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...