What is the size of an array of 3 pointers to int in C

1 Answer

0 votes
#include <stdio.h>

int main(void)
{
    int *arr[3]; // declaration of an array of 3 pointers to int
    int *p;
    
    printf("%u\n", sizeof(int *[3])); // 8 * 3
    printf("%u\n", sizeof p);
        
    return 0;
}

/*
run:
 
24
8

*/

 



answered Sep 3, 2016 by avibootz

Related questions

1 answer 216 views
1 answer 208 views
208 views asked Aug 23, 2016 by avibootz
1 answer 140 views
1 answer 125 views
125 views asked Jul 3, 2024 by avibootz
1 answer 229 views
1 answer 180 views
...