Last Updated :
28 Feb, 2019
What will be the output of the following program?
#include <stdio.h>
void fun(int arr[])
{
unsigned int n = sizeof(arr)/sizeof(arr[0]);
printf(\"%d\", n);
}
int main()
{
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8};
unsigned int n = sizeof(arr)/sizeof(arr[0]);
printf(\"%d \", n);
fun(arr);
return 0;
}
(A) 8 1
(B) 8 8
(C) Error
(D) None of these
Answer: (B)
Explanation:
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...