C Language Structures: From Beginner to Advanced

C Language Structures: From Beginner to Advanced

C Language Structures (struct) From Beginner to Advanced 1) What is a Structure? A structure (<span>struct</span>) “packages” different types of logically related data into a whole, making it easier to pass, store, and manage together. Unlike arrays that can only hold “elements of the same type”, structures can hold “members of different types”. 2) Definition, … Read more

Implementing a String to Integer Conversion Function in C

Implementing a String to Integer Conversion Function in C

The conversion of a string to an integer (the library function is atoi) is a classic string processing problem in C, requiring consideration of various edge cases and exception handling. Below, we will implement a function similar to atoi and explain its implementation approach in detail. Functional Requirement Analysis Ignore leading whitespace characters in the … Read more

Understanding ‘Callback Hell’ in C Language

Understanding 'Callback Hell' in C Language

Content Hello everyone, I am Bug Jun~Recently, I came across a very interesting term “callback hell”, which refers to endless callback functions that ultimately lead to stack overflow and deadlock. The manifestation of this is multiple layers of nested function pointer callbacks, resulting in poor code readability and maintenance difficulties.Below is a simple example simulating … Read more

How to Reassign Values to an Array in C Language

How to Reassign Values to an Array in C Language

It is not possible to directly assign values to an array name.In C language, when we declare and define (after initialization) an array, if we want to reassign values directly to the array, the C compiler may prompt:assignment to expression with array type.For example, the following code: #include <stdio.h> int main(){ int a[] = {1,2}; … Read more

FreeRTOS from Scratch Part 1: Why Should I Learn It? Real-time in Cars is 10 Times More Important than in Phones

FreeRTOS from Scratch Part 1: Why Should I Learn It? Real-time in Cars is 10 Times More Important than in Phones

Talking about cars, today we discuss automotive development technology! I have previously written some articles mainly analyzing cars or the automotive industry, or sharing some automotive knowledge, but another area I really want to delve into, which also aligns with the positioning of this public account, is knowledge related to “automotive technology”. After all, we … Read more

A Comprehensive Guide to Parsing and Saving INI Configuration Files in C on Linux

A Comprehensive Guide to Parsing and Saving INI Configuration Files in C on Linux

Code BraidCertifiedbyMillionsof FollowersAccount By following us, you not only gain a tool for finding resources but also an interesting soul ▶ ▶ ▶ In embedded project development, many functional modules require frequent parameter modifications. On Linux, we can save configuration information using INI format files. This article uses the open-source library iniparser to explain in … Read more

C Language Programming: Creation and Traversal of Binary Trees

C Language Programming: Creation and Traversal of Binary Trees

This program creates a binary tree using a pointer array and implements pre-order, post-order, and in-order traversals of the binary tree. Input: Number of nodes in the binary tree and traversal method code Output: Traversal results #include <stdio.h> #include <stdlib.h> //Traversal of binary Tree //edit by yyh 23/8/2025 12:03 typedef struct tree { int data; … Read more

Why You Cannot Directly Assign Values to String Members of a Struct in C

Why You Cannot Directly Assign Values to String Members of a Struct in C

Attempting to directly assign values to string type members of a structIn the following code, when we try to directly use the “.” operator to access the string (character array) member in the struct and assign a value, the compiler will prompt:assignment to expression with array type, which translates to assigning a value to an … Read more

Microcontroller ADC: Top Ten C Language Filtering Algorithms

Microcontroller ADC: Top Ten C Language Filtering Algorithms

1. Clipping Filter Method 1. Method: Determine the maximum allowable deviation between two samples based on experience (denote as A) When a new value is detected, determine: a. If the difference between the current value and the previous value is <= A, then the current value is validb. If the difference is > A, then … Read more

C Language Example | Implementing a Simple Command Line

C Language Example | Implementing a Simple Command Line

Click the blue “Yikou Linux” in the upper left corner, and select “Set as Favorite“ Get the latest technical articles first ☞【Technical】Learning Path for Embedded Driver Engineers ☞【Technical】Linux Embedded Knowledge Points – Mind Map – Free Access ☞【Employment】A Comprehensive Project Based on Linux IoT for Your Resume ☞【Employment】Resume Template Embedded system development often requires the … Read more