[go: up one dir, main page]

0% found this document useful (0 votes)
4 views1 page

All C Data Types Summary

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

All C Data Types Summary

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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; }

You might also like