Blog

Page 635 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How do you get assembler output from C/C++ source in GCC?
c#gcc

How do you get assembler output from C/C++ source in GCC?

Published on September 2, 2023

# How to Get Assembly Output from C/C++ Source in GCC So, you want to understand how your C/C++ code is getting compiled? That's awesome! It's always good to dive deep into the magic happening behind the scenes. šŸ˜Ž When it comes to getting the assembly o

Cover Image for Is there a performance difference between i++ and ++i in C?
c#oopperformance

Is there a performance difference between i++ and ++i in C?

Published on September 2, 2023

# šŸš€ āœļø The Ultimate Guide: Performance Difference Between `i++` and `++i` in C šŸ•¶ļø Hey there tech enthusiasts! šŸ‘‹ Welcome back to my tech blog, where we break down complex problems into digestible bits. Today, we're delving into the age-old question: Is

Cover Image for Why does sizeof(x++) not increment x?
c#

Why does sizeof(x++) not increment x?

Published on September 2, 2023

# Why does `sizeof(x++)` not increment `x`? šŸ“ Hey tech enthusiasts! Welcome back to our tech blog, where we unravel complicated coding concepts and make them easy to understand. Today, let's dive into a puzzling question about the behavior of the `sizeof

Cover Image for Undefined reference to pthread_create in Linux
c#multithreading

Undefined reference to pthread_create in Linux

Published on September 2, 2023

# Understanding the Undefined Reference to `pthread_create` in Linux Error So, you've stumbled upon an error message that reads **"undefined reference to `pthread_create`"** when trying to compile your code on Linux. Frustrating, isn't it? But fret not! I

Cover Image for What is an unsigned char?
c#char

What is an unsigned char?

Published on September 2, 2023

# Understanding the Unsigned Char: A Byte of Unconventional Power! šŸ’ŖšŸ˜Ž Are you ready to unlock the secrets of a powerful data type in C/C++? Brace yourselves, because today we're diving into the fascinating world of the `unsigned char`! šŸš€āœØ But wait, wh

Cover Image for Why should we typedef a struct so often in C?
c#

Why should we typedef a struct so often in C?

Published on September 2, 2023

# Why should we typedef a struct so often in C? šŸ¤” I have seen many programs consisting of structures like the one below šŸ‘‡ ``` typedef struct { int i; char k; } elem; elem user; ``` Why is it needed so often? Any specific reason or applicable

Cover Image for Why are hexadecimal numbers prefixed with 0x?
c#syntax

Why are hexadecimal numbers prefixed with 0x?

Published on September 2, 2023

šŸ“ **Why are hexadecimal numbers prefixed with 0x?** You've probably encountered hexadecimal numbers before, those funky numbers that use digits ranging from 0 to 9 and letters from A to F. But have you ever wondered why these numbers are often prefixed w

Cover Image for How would one write object-oriented code in C?
c#objectoop

How would one write object-oriented code in C?

Published on September 2, 2023

# šŸŽÆ Object-Oriented Code in C: Unleash Polymorphism! šŸ±ā€šŸ‘¤ So you want to get started with object-oriented programming in C? šŸ¤” Awesome! šŸŽ‰ Even though C is not an object-oriented language šŸ™…ā€ā™‚ļø, you can definitely achieve object-oriented principles like

Cover Image for Why is volatile needed in C?
c#

Why is volatile needed in C?

Published on September 2, 2023

# Why is `volatile` needed in C? šŸ¤” When working with the C programming language, you may come across the keyword `volatile`. At first glance, it might seem confusing and unnecessary. However, `volatile` plays a crucial role in certain scenarios. In this

Cover Image for Programmatically find the number of cores on a machine
c#multithreading

Programmatically find the number of cores on a machine

Published on September 2, 2023

# 🧐 How to Find the Number of Cores on your Machine šŸ–„ļø Are you curious about how to programmatically find the number of cores on your machine? šŸ¤” Look no further! In this blog post, we will address this common question and provide you with easy solution