i have a query on following C programme
code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
struct a
{
char arr[10];
int i;
float b;
}v[2];
printf("\n %d %d %d \n",v[0].arr, &v[0].i, &v[0].b);
printf("\n %d %d %d \n",v[1].arr, &v[1].i, &v[1].b);
printf("\nHello world!\n");
return 0;
}
Output:
2686712 2686724 2686728
2686732 2686744 2686748
Hello world!
Question: v[0].arr == 2686712 and arr[10] that has size 10 bytes &v[0].i <<<< this address should start immediately after the array .. since array is of 10 bytes .. the address of &v[0].i should start from 2686712+10 i.e 2686722 why is &v[0].i == 2686724 and not 2686722