I think the output should be 10 10, but it is 10 1 and idk why.
I tried assigning arr[0]=55 and it made i to be 55 idk why that either. Would be glad to have an explanation
void foo(int arr[])
{
  int i=10;
  arr=&i;
  printf("%d",arr[0]);
}
int main() 
{
  int a[4]={1,2,3,4};
  foo(a);
  printf("%d",a[0]);
  return 0;
}
What i thought: 1010 actual o/p= 101
 
     
     
    