C Programming Tutorial: Using sizeof to Find the Size of Data Types (char, int, float, double)

Опубликовано: 02 Май 2026
на канале: My Code Tutorials
122
3

In this video, we'll learn how to write a C program to display the size of various data types like char, int, float, double, and more, using the sizeof operator.

In C, the sizeof operator is used to determine the number of bytes required to store a specific data type, variable, or expression. We’ll demonstrate how to check the sizes of:
Character data type (char)
Integer data types: short int, int, long int, long long int
Floating-point data types: float, double, and long double

By the end of this video, you’ll know how to utilize the sizeof operator and understand how much memory each data type consumes in a C program.

Key Topics Covered:
sizeof operator
Size of character, integer, and floating-point types
Practical C code examples