Structures in C | Sanfoundry

Опубликовано: 18 Июнь 2026
на канале: Sanfoundry
8,496
189

In this “Structures in C” video, we will learn what a C Structure is, its definition and how an object can be represented as a structure in C programming language. We will discuss examples of structures in user-space (database record) and in kernel-space (struct file). Subsequently, we will cover a live coding demo of C structures from scratch, and doing various operations on the structure viz - reading & printing an employee record (id and name), understanding the memory address (data segment or stack segment) and memory allocated by the compiler for “individual members of the structure” and the “entire structure”.

00:00 What is a Structure in C
00:44 Why is Structure needed in C?
02:21 Declaring a Structure
03:48 Example of C Structure in Userspace - Database
05:30 Example of C Structure in Kernelspace - struct file
07:44 Struct file structure Source Code in the Kernel
11:35 Lab Demo 1 - Reading an Employee record Structure
20:30 Lab Demo 2 - Address of Employee record in Memory
24:58 Lab Demo 3 - Employee record Structure as Global Variable
26:18 Lab Demo 4 - Compiler memory allocation for Employee record

Advanced C Programming Training Course
Instructor: Manish Bhojasia (Founder & CTO @ sanfoundry.com)
Join his free classes at https://t.me/sanfoundryclasses/

1. Advanced C Programming Videos (English Playlist):
   • Advanced C Programming  

2. Advanced C Programming Videos (Hindi Playlist):
   • Advanced C Programming (Hindi)  

3. Advanced C Programming Tutorial Video Series:
https://www.sanfoundry.com/advanced-c...

4. C Interview Questions Video Series:
https://www.sanfoundry.com/c-intervie...

5. 1000 MCQs (Multiple Choice Questions) on C programming:
https://www.sanfoundry.com/c-intervie...

6. Ultimate C Programs Collection (with Data-Structures + Algorithms):
https://www.sanfoundry.com/c-programm...
https://www.sanfoundry.com/1000-c-alg...

#AdvancedCTutorial #CTutorial #CProgramming #ManishBhojasia #Sanfoundry