All Data Types in C – Summary
This document summarizes all data types in the C programming language, including basic
(primitive) types, derived types, enumeration, void type, and user-defined types. Examples and
memory size notes are also included.
Category Data Types Description / Example
Basic (Primary) int, char, float, double Primitive types. int for integers, char for single characters, float/doub
Qualifiers short, long, signed, unsigned Modify storage size or sign representation of basic data types.
Derived Array, Pointer, Function Array: collection of similar data types. Pointer: stores address. Func
User-defined struct, union, typedef, enum struct groups variables, union shares memory, typedef creates alias
Void void Indicates no value. Used in functions that return nothing, or pointers
Example Code:
#include int main() { int age = 25; // int char grade = 'A'; // char float pi =
3.14; // float double bigPi = 3.14159; // double int arr[5] = {1,2,3,4,5}; // array
int *ptr = &age; // pointer struct Student { char name[20]; int roll; }; // struct
enum Day {Mon, Tue, Wed}; // enum printf("Age: %d, Grade: %c, Pi: %.2f", age, grade,
pi); return 0; }