Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Data Types & Sizes | C Programming Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 4 of 50

·c

Data Types & Sizes

8 mins

Course progress8%

What you'll learn

Keep these ideas in mind as you work through the lesson.

4 points
  • `sizeof` returns the size of a type or variable in bytes.
  • `int` is usually 4 bytes on modern platforms.
  • Use `<stdint.h>` for portable fixed‑width integers.
  • `float` (single‑precision) ≈ 7 decimal digits; `double` ≈ 15.

C provides primitive types with implementation‑defined size. The sizeof operator lets you query the exact size in bytes.

CategoryTypesTypical Size (on 64‑bit)
Integerchar, short, int, long, long long1‑8 bytes
Floatingfloat, double, long double4‑16 bytes
Others_Bool, void1 byte (bool)

Use the stdint.h header for fixed‑width types (int8_t, uint32_t, etc.).

Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from C Programming FundamentalsBrowse activities
Previous lessonBasic Syntax & StructureContinue to lesson 5Variables & ConstantsBack to C Programming Fundamentals curriculum