Blog

Page 248 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for What"s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?
c#

What"s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?

Published on September 2, 2023

# What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__? If you are a beginner in C++ programming, chances are you have come across the terms `__PRETTY_FUNCTION__`, `__FUNCTION__`, and `__func__` while reading code or researching onlin

Cover Image for how to use #ifdef with an OR condition?
c#

how to use #ifdef with an OR condition?

Published on September 2, 2023

# How to Use #ifdef with an OR Condition? šŸ¤” Having trouble setting an OR condition in the `#ifdef` directive? No worries, we've got you covered! In this blog post, we'll help you understand the proper way to use the `#ifdef` directive with an OR conditio

Cover Image for How can I autoformat/indent C code in vim?
c#

How can I autoformat/indent C code in vim?

Published on September 2, 2023

# Autoformatting/Indenting C code in Vim šŸš€ So, you've come across some messy C code and you want to bring it back to its pristine, well-indented glory in Vim? Fear not! In this blog post, we'll explore some common issues related to autoformatting C code

Cover Image for Is bool a native C type?
booleanc#gcc

Is bool a native C type?

Published on September 2, 2023

šŸ“ **Title: Bool in C: Unraveling the Mystery** šŸ“· Image: [Illustration of a C code snippet with a question mark](image-link) Are you puzzled by the presence of `bool` in the Linux kernel code? You might be wondering, isn't `bool` a C++ type? šŸ¤” Don't wo

Cover Image for How to achieve function overloading in C?
c#overloading

How to achieve function overloading in C?

Published on September 2, 2023

# Achieving Function Overloading in C: A Guide to Bridging the Gap šŸ“¢ Calling all C programmers! Are you tired of not being able to achieve function overloading in C? Do you find yourself longing for the simplicity and flexibility of this powerful feature

Cover Image for Why do we need C Unions?
c#

Why do we need C Unions?

Published on September 2, 2023

# Unraveling the Mystery Behind C Unions: Do You Really Need Them? šŸ¤” Have you ever found yourself scratching your head, pondering the unseen powers of C unions? šŸ¤·ā€ā™‚ļø Fear not, tech aficionados! Today, we'll embark on an enlightening journey that will d

Cover Image for What"s the rationale for null terminated strings?
c#string

What"s the rationale for null terminated strings?

Published on September 2, 2023

šŸ“ **Title**: Understanding the Rationale for Null Terminated Strings šŸ“· **Image**: A confused emoji scratching its head --- **Introduction** As a fan of C and C++, have you ever wondered why null terminated strings are chosen over length prefixed stri

Cover Image for What do pty and tty mean?
c#

What do pty and tty mean?

Published on September 2, 2023

šŸ“ **What do pty and tty mean? A guide for tech enthusiasts!** 🌟 Do you often come across terms like `pty` and `tty` in open source projects and get confused about their meanings and differences? Well, fret not! In this blog post, we will break down thes

Cover Image for Why does NaN - NaN == 0.0 with the Intel C++ Compiler?
c#floating-point

Why does NaN - NaN == 0.0 with the Intel C++ Compiler?

Published on September 2, 2023

šŸ“ **Why does NaN - NaN == 0.0 with the Intel C++ Compiler?** We've all heard of NaNs (Not a Number), but do you know how they propagate in arithmetic operations? šŸ¤” Well, if you're curious about this behavior, you're in the right place! In this blog post

Cover Image for Why does glibc"s strlen need to be so complicated to run quickly?
c#optimization

Why does glibc"s strlen need to be so complicated to run quickly?

Published on September 2, 2023

šŸ”Ž **Why does glibc's strlen need to be so complicated to run quickly?** When it comes to optimizing code for performance, sometimes simplicity is not enough. The glibc's strlen function may appear complex at first glance, but there are valid reasons behi