learned the sizeof reserved word to get the number of bytes for different variables. However, the number of bytes is machine dependent.
#include <stdio.h>/** * Output the size of common variables * @brief main * @return */intMainvoid) {printf ("%s\n","Now We'll print the size of the variable.");/** the size of the output short type **/printf"Short:%d bytes\n", sizeof ( Short));/** the size of the output int type **/printf"int:%d bytes\n", sizeof (int));/** output A long type of size **/printf"Long:%d bytes\n", sizeof (Long));/** output Float type size **/printf"float:%d bytes\n", sizeof (float));/** output Double type size **/printf"Double:%d bytes\n", sizeof (Double));/** the size of the output long double type **/printf"long double:%d bytes\n", sizeof (Long Double));/** the size of the output char type **/printf"Char:%d bytes\n", sizeof (Char));return 0;}
sizeof () preserves the size of the word get type