Article From:https://www.cnblogs.com/frank-QAQ/p/9061373.html

Array basic knowledge

The answer is: 20, 4, 4, and the answer is under the 32 bit system.


Machine platform: X86_64 processor

Size of char is:                                   1

Size of unsigned char is:                     1

Size of signed char is:                        1

——————————————— 

Size of int is:                                    4

Size of short is:                                2

Size of long is:                                  8

Size of long int is:                             8

Size of signed int is:                          4

Size of unsigned int is:                       4

Size of unsigned long int is:                8

Size of long long int is:                       8

Size of unsigned long long is:              8

——————————————— 

Size of float is:                    4

Size of double is:                 8

Size of long double is:          16

——————————————— 

Size of (void *) is:           8

Size of (char *) is:           8

Size of (int *) is:             8

Size of (long *) is:           8

Size of (long long *) is:   8

Size of (float *) is:          8

Size of (double *) is:       8

 All pointers are 8 bytes

——————————————————————————

Machine platform: X86_32 processor

Size of char is:                            1

Size of unsigned char is:              1

Size of signed char is:           1

———————————————

Size of int is:                       4

Size of short is:                    2

Size of long is:                     4

Size of long int is:                4

Size of signed int is:             4

Size of unsigned int is:          4

Size of unsigned long int is:         4

Size of long long int is:                8

Size of unsigned long long is:       8

———————————————

Size of float is:                    4

Size of double is:                 8

Size of long double is:          8

———————————————

Size of (void *) is:          4    

Size of (char *) is:          4

Size of (int *) is:             4

Size of (long *) is:          4

Size of (long long *) is:   4

Size of (float *) is:          4

Size of (double *) is:       4

All pointers are 4 bytes

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *