Blog

Page 708 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Which is faster: while(1) or while(2)?
c#performance

Which is faster: while(1) or while(2)?

Published on September 2, 2023

# Which is faster: while(1) or while(2)? πŸš€πŸ’¨ Have you ever come across this question in an interview or while discussing code optimization? It seems simple, right? After all, both loops have seemingly the same structure, with a minor difference in the co

Cover Image for Fastest way to check if a file exists using standard C++/C++11,14,17/C?
c#filestream

Fastest way to check if a file exists using standard C++/C++11,14,17/C?

Published on September 2, 2023

πŸ“ The Fastest Way to Check if a File Exists in C++/C πŸ’¨ Have you ever found yourself needing to check if a file exists in your C++ or C code? πŸ€” Whether you're working with thousands of files or just a few, it's important to have a fast and reliable way

Cover Image for Undefined, unspecified and implementation-defined behavior
c#

Undefined, unspecified and implementation-defined behavior

Published on September 2, 2023

# Understanding Undefined, Unspecified, and Implementation-Defined Behavior in C and C++ πŸ˜•πŸ€” Have you ever encountered some strange and unexpected behavior in your C or C++ code? Maybe your program crashed without any apparent reason or produced results

Cover Image for What REALLY happens when you don"t free after malloc before program termination?
c#

What REALLY happens when you don"t free after malloc before program termination?

Published on September 2, 2023

## The Real Deal with Not Freeing Memory After Malloc 🧠 Ever wondered what REALLY happens when you don't free memory after allocating it with malloc? Is it actually a big deal, or can you get away with skipping this step? Let's dig into this topic and un

Cover Image for "static const" vs "#define" vs "enum"
c#

"static const" vs "#define" vs "enum"

Published on September 2, 2023

# "static const" vs "#define" vs "enum": Choosing the Best Way to Define Constants in C πŸ€” Are you struggling to decide which statement to use when defining constants in C? Don't worry, we've got you covered! In this blog post, we'll explore the differenc

Cover Image for What is a "static" function in C?
c#functionstaticterminology

What is a "static" function in C?

Published on September 2, 2023

πŸ“ The Mystery of "Static" Functions in C Are you puzzled by the concept of "static" functions in C? πŸ€” Don't worry, you're not alone! In this blog post, we'll dive into the world of static functions and unravel their secrets. By the end, you'll have a so

Cover Image for Why is β€œwhile( !feof(file) )” always wrong?
c#file

Why is β€œwhile( !feof(file) )” always wrong?

Published on September 2, 2023

πŸ“ Blog Post: Why is "while( !feof(file) )" always wrong? πŸ€”βŒ Introduction: Hey there, tech enthusiasts! πŸ‘‹ Have you ever wondered why using "while( !feof(file) )" in your code is always wrong? πŸ€” In this blog post, we are going to address this common is

Cover Image for What does "dereferencing" a pointer mean in C/C++?
c#

What does "dereferencing" a pointer mean in C/C++?

Published on September 2, 2023

πŸ” What does 'dereferencing' a pointer mean in C/C++? πŸ–₯️ If you're new to programming or just diving into the world of C/C++, the concept of 'dereferencing' a pointer might seem a bit confusing. But fear not! πŸ¦Έβ€β™€οΈ In this blog post, we're going to demys

Cover Image for Difference between static and shared libraries?
c#

Difference between static and shared libraries?

Published on September 2, 2023

# Understanding Static and Shared Libraries πŸ“š **Introduction** Do you ever wonder what the difference is between static and shared libraries? πŸ€” You're not alone! Many programmers, whether beginners or experienced, often come across this question. In th

Blog | Matheus Mello