-
What will be the output of the following C code?
#include <stdio.h>
void fun( int[] );
int main()
{
int array[5] = {10, 20, 30, 40, 50};
fun(array);
printf("%d ", array[2]);
}
void fun(int ptr[5])
{
int n = 100;
ptr = &n;
printf("%d ", ptr[0]);
}
-
- 100 100
- 10 100
- 100 10
- 30 100
- 100 30
Correct Option: E
100 30