0

I am a beginner in coding. In the code given below there sizeof()returns different values inside a function(output 8) and main(output 64) function. But why?? And here's my code:

#include <stdio.h>

void example(int ara[]) 
{
    printf("Size of the array in example function is: %d", sizeof (ara));
}

int main()
{

int ara[] = {1, 4, 6, 8, 9, 11, 14, 15, 20, 25, 33, 83, 87, 97, 99, 100};

printf("Size of the array is: %d\n", sizeof(ara));
example(ara);

return 0;
}
Nafis
  • 19
  • 3

0 Answers0