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

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 19 of 50 · c

Unions

Duration: 7 mins

union shares the same memory location for all its members. Only one member can be active at a time.

union Data {
    int i;
    float f;
    char c;
};
Previous: Structures (`struct`)Next: Enumerations (`enum`)