Home > Back-end >  The sizeof problems in c language
The sizeof problems in c language

Time:09-20

What a string of code, the result of the output of the program is on behalf of what?

# include
Int main () {
Printf (" sizeof (char) : % d \ n ", sizeof (char));
Printf (" sizeof (unsigned char) : % d \ n ", sizeof (unsigned char));
Printf (" sizeof (short int) % d \ n ", sizeof (short int));
Printf (" sizeof (unsigned short int) % d \ n ", sizeof (unsigned short int));
Printf (" sizeof (int) % d \ n ", sizeof (int));
Printf (" sizeof (unsigned int) % d \ n ", sizeof (unsigned int));
Printf (" sizeof (long) % d \ n ", sizeof (long));
Printf (" sizeof (unsigned long) % d \ n ", sizeof (unsigned long));
Printf (" sizeof (long long) % d \ n ", sizeof (long long));
Printf (" sizeof (unsigned long long) % d \ n ", sizeof (unsigned long long));
Printf (" sizeof (float) % d \ n ", sizeof (float).
Printf (" sizeof (double) % d \ n ", sizeof (double));
Printf (" sizeof (long double) % d \ n ", sizeof (long double));
}

CodePudding user response:

Sizeof operator in c/c + +, and returns an object or the data type of bytes of memory,
The original poster to the output of various data types of the code is in memory of bytes, hope to adopt...
  • Related