What will be the output of the below code? the answer given is E)0 but I am not getting it.
#include <stdio.h>
void fun(short int *a,char *b)
{
b += 2;
short int *p = (short int*)b;
*p = *a;
}
int main()
{
void (*fptr)(short int *,char *)
short int a = 101;
char arr[] = {'a','b','c','d'};
fptr = fun;
(*fptr)(&a,arr);
printf("%d", arr[3]);
return 0;
}
$A)$ Compilation error.
$B) 100$
$C)$ Garbage Value
$D)$ Segmentation Fault.
$E) 0$