Tagged articles
pointers
40 articles · Page 1 of 1
This article outlines the essential embedded‑engineer interview questions—covering pointers, memory management, interrupts, peripheral protocols, debugging strategies, and system design—while explaining the reasoning behind each question and what answers reveal about a candidate's depth of knowledge.
C languageDebuggingEmbedded
0 likes · 8 min read

The article explains that C’s steep learning curve stems from its low‑level environment setup, opaque debugging, complex pointer syntax, and manual memory management, while also arguing that mastering C is valuable for low‑level development and deep understanding of computer fundamentals.
C languagelow-level developmentmemory management
0 likes · 7 min read

This article systematically explores Go's most confusing features—including pointer semantics, defer execution order, lightweight object‑oriented patterns via struct embedding, interface‑based polymorphism, and the empty interface with type assertions—through over twenty runnable code snippets that reveal the underlying design principles.
GoPolymorphismdefer
0 likes · 17 min read

This article explains the fundamental differences between C arrays and pointers by examining memory layout, mutability, sizeof behavior, function parameter handling, multidimensional arrays, and practical best‑practice guidelines, providing clear code examples that reveal why declarations like char s1[] = "liangxu" and char *s2 = "liangxu" behave differently.
Best PracticesC++Memory Layout
0 likes · 14 min read
![Why char s1[] and char *s2 Aren’t the Same: Deep Dive into C Arrays vs Pointers](https://wsrv.nl/?url=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FIsrmVA0RIYPW1nAJrMmHpibicNeaHnBO6YBda03t5sT9RSwOToPd5nGYPDP2nEasScEMOWpUvH6aZib0ovlTXOnbw%2F0%3Fwx_fmt%3Djpeg)
This guide explains why Go pointers matter, covers their definition, memory model, and safe usage, provides practical best‑practice checklists, performance comparisons, and code examples—including handling large structs, optional fields, and complex data structures—while highlighting scenarios where pointers should be avoided.
Best PracticesGocode review
0 likes · 8 min read

This guide enumerates thirteen classic C segmentation fault patterns—including null pointer dereference, illegal memory access, stack overflow, buffer overrun, and misuse of dynamic memory—provides concise code examples for each, explains the underlying cause, and offers practical tips to prevent such crashes.
C++memory managementpointers
0 likes · 9 min read

This article explains what pointers are in the C language, how to define and use them, common scenarios such as dynamic memory allocation and array handling, and provides a complete, annotated example that demonstrates accessing and modifying variable values through pointers.
C++fundamentalsmemory management
0 likes · 4 min read

This article walks through seventeen classic C programming mistakes that cause segmentation faults—such as null pointers, out‑of‑bounds array access, wild pointers, double frees, and format string bugs—and provides safe, production‑ready code examples to prevent each crash.
C++memory managementpointers
0 likes · 18 min read

Understanding C++ parameter passing—by value, by reference, and by pointer—is essential for optimizing performance, memory usage, and data safety, and this guide explains each method’s characteristics, provides code examples, and offers practical advice on selecting the appropriate technique for different scenarios.
C++Function ParametersPass by Reference
0 likes · 6 min read

This article explains how the C language enables low‑level hardware control by exposing CPU registers and physical memory, using inline assembly for direct register access, and leveraging pointers to manipulate memory addresses, while also discussing the risks and responsibilities involved.
CPU registersc-programminghardware control
0 likes · 8 min read

Learn what const means in C++, how to declare constants, use const with pointers, functions, and member methods, understand constexpr, and follow best practices to improve code safety, readability, and compiler optimization.
Best PracticesC++const
0 likes · 6 min read

This article explores how the C language enables low‑level hardware control by detailing the roles of CPU registers and physical memory, illustrating direct register access via inline assembly, and explaining pointer usage for memory manipulation, highlighting the trust C places in programmers and the responsibilities it entails.
System Programmingc-programminghardware control
0 likes · 9 min read

This comprehensive Go tutorial explains what pointers are, their basic syntax, common uses such as avoiding copies and modifying external variables, memory management including stack vs. heap and escape analysis, and outlines common pitfalls and best practices for safe and efficient pointer usage.
Goescape analysismemory management
0 likes · 8 min read

This article explains the historical reasons behind the invention of pointers, walks through early memory manipulation, variable abstraction, the need for shared data, and demonstrates how pointers enable address passing, dynamic memory allocation, and complex data structures such as linked lists and trees, all with clear C code examples.
C++dynamic allocationmemory management
0 likes · 15 min read

This article explains how memory addresses are numbered, why direct writes are risky, how symbolic variables simplify programming, the limitations of pass‑by‑value in C, and how introducing pointers provides the necessary indirection to manipulate memory safely and efficiently.
C languageMemorypointers
0 likes · 7 min read

This article explains C function pointers—from basic declaration and typedef usage to calling functions, passing pointers as parameters for callbacks, returning pointers from functions, and creating pointer arrays—illustrated with complete code samples and practical use cases.
C++Code Examplescallbacks
0 likes · 14 min read


21CTOJun 15, 2024 · Fundamentals
This article introduces the Virgil programming language, highlighting its goal as a lightweight high‑performance system language with powerful cross‑compilation, comparing it to Zig and Rust, and provides step‑by‑step installation, code examples, algebraic data types, and pointer usage for developers.
Cross-compilationSystems ProgrammingVirgil
0 likes · 8 min read

This guide explains Go's various operators—including arithmetic, assignment, relational, logical, bitwise, and pointer operators—provides clear code samples for each type, demonstrates their output, and clarifies how they behave in different scenarios.
ArithmeticGobitwise
0 likes · 10 min read

This article explains Go's pointers, slices, and maps, detailing their internal relationships, demonstrating how slices share underlying arrays via pointers, and showing how maps store pointers for efficient data access, accompanied by practical code examples and usage tips for safe, high‑performance programming.
Gomapsmemory management
0 likes · 6 min read

This article explains Go's pointer model, why the language forbids generating pointers from non‑pointer values, how garbage collection and memory compaction cause object addresses to change at runtime, and provides best practices and code examples for safely using pointers in Go programs.
Gogarbage collectionmemory safety
0 likes · 5 min read

This article provides a comprehensive overview of C++ memory management, covering stack vs heap allocation, deep vs shallow copying, common errors such as leaks, dangling pointers, double frees, and offers practical techniques like custom new/delete overloads, smart pointers, RAII, and tools for detecting memory problems.
C++RAIIdynamic allocation
0 likes · 92 min read

The article offers a concise, modern C++ (C++11+) tutorial covering fundamental built‑in types, variable declaration with auto and uniform initialization, pointer and array handling, function definitions, overloading, templates, class design—including constructors, move semantics, inheritance, virtual functions—and essential standard‑library utilities such as smart pointers and std::function.
C++Classesfunctions
0 likes · 48 min read

This comprehensive guide introduces modern C++ fundamentals, covering core language features such as basic types, memory management, pointers, arrays, functions, object‑oriented concepts, templates, and best‑practice idioms to help developers refresh or build a solid C++ foundation.
C++Tutorialbasics
0 likes · 51 min read

This comprehensive guide explains the fundamentals of pointers in C, covering memory layout, variable storage, address arithmetic, const and void pointers, pointer arrays, function pointers, and common pitfalls, with clear diagrams and runnable code examples to deepen your understanding of low‑level programming.
C++Code Examplesdata types
0 likes · 30 min read

This article provides a thorough overview of essential C language concepts frequently asked in interviews, covering topics such as language basics, keywords, variables, pointers, arrays, memory management, functions, recursion, data structures, preprocessor directives, and practical code examples to help readers master high‑frequency C interview questions.
Interview Preparationc-programmingpointers
0 likes · 70 min read

This tutorial explains C pointers in depth, covering memory addresses, declaration, initialization, dereferencing, pointer arithmetic, function pointers, passing by reference, and dynamic memory allocation, with clear code examples and practical usage tips.
C++pointers
0 likes · 8 min read

The article explains how to read and write a tiny 8‑byte memory without an operating system or high‑level language, introducing the concepts of memory addresses, store/load instructions, variables, references, pointers, indirect addressing, and their role in building data structures like linked lists.
fundamentalspointersvariables
0 likes · 8 min read

This article explains C pointers in depth, covering memory layout, declaration, initialization, dereferencing, pointer arithmetic, function pointers, passing by reference, dynamic memory allocation, and common use cases, with clear code examples for each concept.
C++Code Examplespointers
0 likes · 9 min read

This article explains the fundamentals of C pointer variables, covering their memory layout, declaration, initialization, pointer arithmetic with arrays, passing pointers between functions, and using arrays as function parameters, illustrated with clear code examples and diagrams.
C++Memoryarrays
0 likes · 8 min read

This article explains the fundamentals of C function pointers, how to declare and use them, employ typedef for readability, pass them as arguments, return them from functions, store them in arrays, and apply them to implement flexible callback mechanisms with complete code examples.
C languageC++callbacks
0 likes · 14 min read

This article explains how improper pointer usage and memory‑alignment violations in C can cause crashes on microcontrollers, demonstrates the issue with a concrete code example, and provides portable solutions such as byte‑wise access or memcpy to avoid unaligned accesses.
C++MCUMemcpy
0 likes · 6 min read

This article provides a comprehensive guide to C functions—including their categories, signatures, parameter passing, pointer parameters, variadic arguments, callbacks, and recursion—and delves into the C preprocessor, covering directives, macro definitions, operators, and practical macro examples for safer and more expressive code.
C++MacrosPreprocessor
0 likes · 17 min read

This guide explains C pointers, covering their definition, basic syntax, pointer arithmetic, multi‑level pointers, the relationship between pointers and multi‑dimensional arrays, and the distinction between array pointers and pointer arrays, supplemented with clear code examples and visual analogies.
C++Multi-level Pointersarrays
0 likes · 12 min read

The guide thoroughly explains C++’s intricate syntax and language features—from historic C inheritance, array handling, and implicit conversions to enums, macros, and const correctness—while detailing modern C++11 concepts like rvalue references, move semantics, reference collapsing, perfect forwarding, and auto deduction to help developers avoid pitfalls and write cleaner, efficient code.
C++language featurespointers
0 likes · 50 min read

This article explains how Go pointers work, why they differ from C pointers, and highlights frequent mistakes such as struct pointer assignments, for‑range loop quirks, closure captures, and memory‑escape scenarios, providing clear code examples and runtime insights.
Runtimeclosuresfor-range
0 likes · 13 min read

This article explains why native pointers do not exist in Python, describes the underlying object model, immutable versus mutable objects, the distinction between variables and names, and demonstrates several practical ways to emulate pointer behavior using mutable containers, custom classes, and the ctypes module.
Mutable TypesPythonctypes
0 likes · 18 min read

The article explains the historical and technical reasons why most programming languages adopt zero‑based indexing for arrays and loops, illustrating the concept with C, Python and early languages, and showing how zero‑based offsets simplify pointer arithmetic and enable elegant slice syntax.
C languagePythonarrays
0 likes · 8 min read

This article enumerates ten frequent Go programming errors—from unknown enum handling and benchmark mis‑optimizations to pointer misuse, slice initialization, context pitfalls, and error‑handling practices—explaining why they occur, showing reproducible code examples, and offering concrete fixes to write more reliable Go code.
ContextGobenchmark
0 likes · 14 min read

Explore the essential C programming concepts—from basic data types, constants, and variables to complex structures, unions, enums, and pointers—through clear explanations, practical examples, and code snippets, helping beginners understand memory allocation, type definitions, and safe coding practices.
Tutorialc-programmingenumerations
0 likes · 18 min read

This article explores Swift's memory model and pointer mechanics, explains how HandyJSON converts JSON to class instances without runtime support, demonstrates MemoryLayout utilities, and shows practical techniques for modifying struct and class properties directly in memory.
JSON parsingMemory LayoutSWIFT
0 likes · 17 min read
