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 210 views
1 answer 192 views
192 views asked Aug 23, 2016 by avibootz
1 answer 128 views
1 answer 116 views
116 views asked Jul 3, 2024 by avibootz
1 answer 170 views
1 answer 212 views
...