Advanced C Programming Tutorial Video Series

«

In the Advanced C Programming tutorial video series, you will develop a deeper understanding of the C programming language which will help you become an efficient C programmer. You will learn the deep C secrets and how things work behind the scenes, with 1000s of live C programming examples and/or code snippets. Kindly note that the prerequisite for this course is a Basic knowledge of C programming.

Here’s the latest video:


The entire video series is available freely on Youtube and our Founder & CTO, Manish sir, is the instructor for these videos. We will be uploading 1 video per week, so subscribe to the Sanfoundry-Youtube channel for upcoming videos or join the Advanced C Programming Playlist in our channel.

advertisement

List of C Programming Videos:

  1. Advanced C Programming Introduction (+5 Tricky Code with Solution)
  2. Advanced C Programming Syllabus
  3. Getting Started with Advanced C Programming (+ Lab Setup)
  4. C Data Types (+3 Design Questions)
  5. C Data Types – Memory Allocation (+7 Code Snippets with Solution)
  6. C Data Types – Bits & Bytes (+7 Test Cases with Solution)
  7. How to code like a Pro in C Language! A Professional Software Developer
  8. C Data Types – Min and Max Values
  9. Structures in C (C Structure Basics with Live Code Demo)
  10. Unions in C Language (+2 Design & Tricky Questions)
  11. Little Endian vs Big Endian in C | Endianness of a Processor (+1 Tricky Demo)
  12. Bit-fields in C (+1 Design Problem)
  13. Typedef in C & how to Design using Typedef
  14. Enum (Enumeration) in C Language
  15. Arrays in C Language

Video#1: Advanced C Programming Introduction (+5 Tricky Code with Solution)

This tutorial video is an introduction to Advanced C Programming. The prerequisite for this course is a basic knowledge of C programming. We will try to understand (with 5 good and/or tricky examples) the difference between a “Basic knowledge of C language” vs. “Advanced knowledge of C”. This will help you evaluate your current knowledge of C and then dive deep into the internals of C language which will help you become an efficient programmer in C.

C programming looks easy at the beginning but it becomes more and more involved and complicated as we move towards a deeper level of C programming. So, it requires a substantial amount of practice to master the C language.

Important Topics of this Video:
00:00 – Introduction to C
01:58 – Tricky C Code Snippets
05:27 – Tricky C Code 1 Solution
10:32 – Tricky C Code 2 Solution
13:22 – Tricky C Code 3 Solution
17:34 – Tricky C Code 4 Solution
22:19 – Tricky C Code 5 Solution
28:04 – Resources – 1000 MCQs

advertisement
advertisement

Video#2: Advanced C Programming Syllabus

In this video, we are going to understand the detailed syllabus of the “Advanced C programming” course. The C language is really vast and we have broken it down into a detailed list of various topics and subtopics that covers almost all basic to advanced level topics in the C programming language.

Video#3: Getting Started with Advanced C Programming (+ Lab Setup)

In this “Getting Started” C tutorial, we will discuss the lab setup and compilers briefly, followed by an introduction to the C programming language. We will cover the benefits of programming in C for system and application software and its efficiency. Then we will talk about the compilation process and understand the difference between the “object code” versus “binary executable code”, followed by coverage on tokens of C programming, C instructions, the difference between constants, variables, identifiers, and keywords. The lab will cover a few simple exercises and commands to distinguish between object code and executable code; We will also have examples of the importance of statement terminator (semicolon) in C.

advertisement

Important Topics of this Video:
00:00 – Getting Started with C Programming
00:18 – Linux Machine vs Windows Machine
02:23 – Online Compiler vs Offline Compiler for C Programming
03:40 – C Language Benefits and Efficiency
11:35 – C Program Compilation – Object code vs Binary Executable code
15:03 – C Programming Recap
21:33 – Constants, Variables, Identifiers and Keywords in C
24:32 – Lab Exercise1 – Object code vs Binary code demo
30:40 – Lab Exercise2 – Significance of Semicolon in C

Video#4: C Data Types (+3 Design Questions)

In this “C Data Types” video, we will discuss in detail primitive data types, user-defined data types as well as derived / dependent data types in the C programming language. We will start with 3+ live examples on how to choose data types in your software designs, followed by their solutions along with a detailed explanation of all the 3 categories of data types in C.

Important Topics of this Video:
00:00 – Data Types in C
01:15 – C Data Type Questions on Hard Disk, Controller, and Length
02:35 – What data type really means in memory?
06:11 – Primitive Data types in C – In-depth
14:06 – What is Void data type in C?
19:50 – Solution for C Data Type Design Question – Hard Disk
31:42 – Solution for C Data Type Design Question – Microcontroller / Microprocessor
39:15 – Solution for C Data Type Design Question – String Length
49:30 – User-Defined Data Types in C Explained
59:18 – Long long data type in C
01:07:15 – “Long” vs “Long Long” Data type in 32-bit System
01:09:50 – Derived / Dependent Data types in C

advertisement

Video#5: C Data Types – Memory Allocation (+7 Code Snippets with Solution)

In this C programming video, we will discuss the size of primitive data types in C Language along with the memory allocated for them. We will start with 7+ live test examples on C programming to understand the size of memory (in bytes) for various data types, followed by a discussion on 32-bit vs 64-bit differences and then lab exercises to code and test them.

Important Topics of this Video:
00:00 – Memory allocation for C data types
00:19 – Size of memory for char, int, and long data types in C
01:47 – Size of C pointer variables for char, int, and long on 32-bit & 64-bit platforms
03:02 – Size of “void” and “void pointer” variables in C
04:16 – Test on size of data types and pointers in C
07:09 – Why should we understand memory allocation in C?
09:08 – Memory allocation for Primitive data types in C
13:06 – Size of long long data type in C
13:15 – Size of float and double data types in C
13:40 – 32-bit vs 64-bit sizes for fundamental data types in C
14:45 – Lab exercises on sizes of data types in C

Video#6: C Data Types – Bits & Bytes (+7 Test Cases with Solution)

In this C programming bits and bytes video tutorial, we will learn with “7+ live test cases” how signed and unsigned data types like character, integer, etc. are stored in memory in terms of bits and bytes and why it is important to know the internal representation of these data types in C programming language.

Important Topics of this Video:
00:00 – Memory for Data Types in Bits and Bytes
00:33 – C Code (7 test cases) on data-types sizes and values
08:14 – Least Significant Bit and Most Significant Bit
10:40 – Storing a Negative Number in Memory (2’s Complement)
17:47 – Storing Signed and Unsigned Integers in Memory
24:58 – Lab Demo on 7 test cases and solution

advertisement

Video#7: How to code like a Pro in C Language! A Professional Software Developer

How to code like a Pro in C language! A Professional Software Developer – In this video, you will learn what mistakes a beginner generally does in their code, and how a Pro will write good and efficient code. We will do a live coding session with a simple example code and keep improving it so that you will learn how a simple code can be transformed into a professional-grade code. At the end of the video, you will see another bad code that will take hours and months to complete, and then how to fix that problem efficiently, like a Pro, a professional software developer!

Important Topics of this Video:
00:00 – Introduction to C Coding for the Professional
00:52 – Plan and Steps to Code a C Program and improve it iteratively
03:50 – C example program on mix and max values for short data type
05:13 – Live C code – Version 1
15:38 – Live C code – Version 2 (improvement)
20:22 – Live C code – Version 3 (further improvement)
25:35 – Live C code – Version 4 (more improvement)
32:11 – Tricky C code using the max value of long datatype in C

Video#8: C Data Types – Min and Max Values

In this C data types min and max video tutorial, we will learn how to calculate and remember the minimum and maximum values of various data types. We will learn why it is important to know their range of values in C programming with a few tricky code snippets and what are the pitfalls of “NOT” knowing them. At last, we also talk about how to improve our code and become a professional programmer in the C language.

Important Topics of this Video:
00:00 – Minimum and Maximum values for data types in C
01:38 – Min-Max for signed and unsigned data types in C
02:50 – Easy way to calculate the min-max values in C
10:25 – Formula to calculate the min-max for a data type
20:08 – Easy ways to remember the min-max values
36:31 – C Test 1 (Min-Max Overflow Issues – Char Data type)
38:23 – C Test 2 (Min-Max Overflow Issues – Integer Data type)
39:26 – Live Demo for C Tests 1 & 2 with Detailed Explanation
50:21 – Min-Max Values for Floating-Point Numbers in C
52:05 – Efficient Coding Strategy for “Professional Software Development” in C

Video#9: Structures in C (Structure Basics with Live Code Demo)

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 the 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”.

Important Topics of this Video:
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

Video#10: Unions in C Language (+2 Design & Tricky Questions)

In this “Unions in C Programming Language” video, we will learn what a Union is, its definition and why we need a Union data type in C programming language. We will cover practical examples of where Union is used in the Linux kernel with live code as well as in protocols, device drivers, and other places. We will also discuss the representation of various members of the union in memory along with live demo code to explain the operations on Unions. We will differentiate Structures and Unions with live code. In the end, we will discuss the implications of correct (or incorrect) union programming with a live code and the issues thereof, including issues with little-endian and big-endian machines.

Important Topics of this Video:
00:00 – Agenda
01:10 – Unions in C
03:26 – Why do we need Unions?
04:06 – Structures vs Unions
05:05 – Quiz Question on Structure vs Union (Code Snippet)
07:51 – Practical Examples of Unions in Linux Kernel
11:35 – C Code Union Example for Telecom Network – 2G, 3G, 4G, and 5G
13:50 – Unions for Protocol, Device Drivers, CPU Hardware
15:15 – Kernel code walkthrough of usage of Union for Bios Registers & Threads
20:04 – Design / Interview Question on Unions
22:02 – Memory Diagram / Layout for Members of a Union
22:57 – Tricky and Classic coding Problem on Union
26:30 – Live Coding of Union Tricky Code with Solution
31:00 – Union memory Issues with Little-endian and Big-endian machines

Video#11: Little Endian vs Big Endian in C | Endianness of a Processor (+1 Tricky Demo)

In this “Endianness in C Language” video, we will learn what an Endianness of a Processor is followed by the difference between the Little-endian and Big-endian systems. We will learn endianness with a live example and a memory diagram. We will cover programming examples where we have to be aware of endianness and the portability issues (for example in networking programming and kernel TCP header). Then we will discuss how we can solve the endianness problem in the Linux platform, followed by a live tricky code on memory manipulation and endianness issues.

Important Topics of this Video:
00:00 – The Endianness of a Processor
03:53 – Little Endian Explained (LLL)
09:55 – Live Demo – C code to explain Little Endian concepts
14:39 – Big Endian Explained (BLH)
16:52 – Portability Issues
20:54 – Usage in Network Programming (Linux Userspace)
27:01 – Solutions in Linux Platform
28:44 – Practical Examples of Endianness (Linux Kernel)
31:44 – Live Demo – Tricky C code with Union and Endianness Issues

Video#12: Bit-fields in C (+1 Design Problem)

In the “Bitfields in C” video, you will learn what a bit-field is and why we need bit-fields in C programming, followed by “How to design bitfields” for our requirement. We will cover live coding of Bit-fields in C from scratch and also discuss 5 tricky examples on bit fields for a deeper level of understanding. Then we talk about where bit-fields are used in the Linux kernel as a practical example.

Important Topics of this Video:
00:00 – Bit fields in C
01:40 – What is Bit-field?
02:12 – Why do you need a Bit-field?
03:45 – Bit fields as a Structure in C implementation
04:35 – Designing Bit-field Representation in C
09:30 – Live Demo – Bit-field Coding in C from Scratch
12:57 – Bit fields Memory allocation by the Compiler
15:47 – Bit-fields in C – Tricky Code 1 with Explanation
16:34 – Bit-fields in C – Tricky Code 2 with Explanation
17:42 – Bit-fields in C – Tricky Code 3 with Explanation
19:11 – Data-types for Bit-fields in C
20:51 – Bit-fields in C – Tricky Code 4 with Explanation
26:30 – Bit-fields in C – Tricky Code 5 with Explanation
27:46 – Practical Examples of Bit-fields in Linux Kernel

Video#13: Typedef in C & how to Design using Typedef

In the “Typedef in C” video, we are going to learn what Typedef is in the C programming language and why we need it. We will discuss the syntax of typedef as well as a series of examples of typedefs in Linux header files, library functions, and kernel code. We will also briefly talk about typedef usage for function pointers with examples from the Linux signal() system call. Then we will discuss how to design and define typedef for our C programming requirements.

Important Topics of this Video:
00:00 – Typedef in C
01:10 – What is Typedef in C?
02:35 – Why Typedef in C?
03:37 – Syntax of Typedef in C
05:08 – Typedef examples in Userspace
05:30 – Typedef in C Library
09:23 – Typedef example: size_t for strlen()
14:12 – Typedef example: unsigned data types of various sizes
16:21 – Typedef example: mode_t, uid_t, gid_t for File permissions
18:18 – Typedef example: dev_t for Device Drivers
19:57 – Typedef example: FILE for C standard I/O Library
23:48 – Typedef for Function Pointers in C
25:12 – Typedef function pointer example: signal() system call
26:40 – Demo code – designing and defining Typedef

Video#14: Enum (Enumeration) in C Language

In the “Enumeration in C Language” video, we are going to learn what Enum is and why we need Enum in C programming. We will discuss the syntax of Enums along with 2 sample examples, followed by the difference between usage of Enumerations and Macros in C programming. Subsequently, we will discuss 4 different examples of usage of enums in the Linux kernel.

Important Topics of this Video:
00:00 – Enums in C
01:00 – What is Enumeration in C?
02:21 – Why Enumeration in C?
02:41 – Syntax of Enumeration in C
07:52 – Enums vs Macro in C
09:51 – Enumeration examples in Linux Kernel

Video#15: Arrays in C Language

In the “Arrays in C Language” video, we are going to learn what an array is and how do we represent an array in memory. We will discuss array declaration, definition, and initialization in C with example code. Then, we will solve 4 tricky problems on C arrays with a live code walkthrough. We will also cover the differences between character arrays and strings and the issues we generally encounter while coding them.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!
advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter