C Program Examples

A comprehensive collection of simple, working C programs.
Skip to content
  • Home
  • C Programs List
  • K&R Solutions
  • C Aptitude Questions and Answers for Interview Preparation

Start Here

New to C?

  • Install GCC on Windows
  • Install GCC on Linux
  • Install GCC on macOS
  • Set up VS Code for C

Browse C Programs

  • All C Programs
  • Binary Search
  • Binary Search Tree
  • Sort a Linked List
  • Fibonacci (Recursion)
  • Reverse String (Pointers)

K&R Exercises

  • All Chapters Overview
  • Ch 1 — Tutorial Introduction
  • Ch 2 — Types & Operators
  • Ch 3 — Control Flow
  • Ch 4 — Functions
  • Ch 5 — Pointers & Arrays
  • Ch 6 — Structures
  • Ch 7 — I/O

Exam & Interview Prep

  • C Aptitude Questions

sizeof union

C program to find the size of a union.

Posted on October 4, 2011 by Sandeepa Nadahalli

C program to find the size of a union. Union is a collection of different data types like a structure but it gives the single piece of memory for all data types. In this program we use the sizeof() operator to find the size of union. sizeof() return the size of data types in bytes. …

Uncategorized   C code, C program, C Programming, Free C Program, sizeof union, union, VTU C Program
0

Book Pick

The C Programming Language — K&R (Amazon.in)

Powered by WordPress | Theme: Bootstrap Basic