Blog

Page 279 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Purpose of Unions in C and C++
c#

Purpose of Unions in C and C++

Published on September 2, 2023

# The Purpose of Unions in C and C++: Explained πŸ€”πŸ’‘ Have you ever used unions in C or C++? If so, you might be surprised to learn that accessing a member of a union that hasn't been recently written to can lead to undefined behavior. 😱 So what exactly i

Cover Image for Why does the arrow (->) operator in C exist?
c#

Why does the arrow (->) operator in C exist?

Published on September 2, 2023

## Why does the arrow (->) operator in C exist? πŸ€” Have you ever wondered why C has the arrow operator (->) instead of just using the dot operator (.) for accessing struct members through a pointer? It may seem like a small syntax difference, but there is

Cover Image for Why do you have to link the math library in C?
c#

Why do you have to link the math library in C?

Published on September 2, 2023

# Why do you have to link the math library in C? πŸ€” So, you're working on a C program and you encounter this peculiar situation. When you include `<stdlib.h>` or `<stdio.h>` in your code, you don't have to worry about linking them during compilation. But,

Cover Image for How to convert a string to integer in C?
c#string

How to convert a string to integer in C?

Published on September 2, 2023

# How to Convert a String to Integer in C? πŸ€”πŸ’‘ Are you tired of using the same old method to convert a string to an integer in C? Looking for a better or alternative way? You've come to the right place! In this blog post, we'll explore different methods

Cover Image for strdup() - what does it do in C?
c#function

strdup() - what does it do in C?

Published on September 2, 2023

πŸ“Title: Decoding the Magic of strdup() in C - Unraveling its Purpose and Potential Pitfalls! πŸ§™β€β™‚οΈβœ¨ πŸ‘‹ Hey there, tech enthusiasts! Today, we'll dive into the fascinating world of the strdup() function in C. Ever wondered what this mysterious function do

Cover Image for Arrow operator (->) usage in C
c#syntax

Arrow operator (->) usage in C

Published on September 2, 2023

# Understanding the Arrow Operator (-&gt;) in C 🏹 πŸ‘‹ Hey there! Are you new to the world of pointers in C? Do you find the arrow operator (-&gt;) confusing? Don't worry, you're not alone! In this blog post, we'll dive into the usage of the arrow operator

Cover Image for SQL Server Text type vs. varchar data type

SQL Server Text type vs. varchar data type

Published on September 2, 2023

πŸ“ **Tech Blog Post: SQL Server Text Type vs. Varchar Data Type - A Practical Guide** Hey there tech enthusiasts! πŸ˜„ Are you puzzled about which SQL data type to use to store variable length character data in your SQL Server database? πŸ€” Don't worry, we'v

Cover Image for Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?
c#

Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?

Published on September 2, 2023

# What's With the Segmentation Fault: "char *s" vs "char s[]"? βœ‹πŸ˜± Oh no! You just ran into a dreaded segmentation fault error when trying to modify a string. Don't worry, you're not alone. This error can be quite sneaky, but fear not! πŸ’ͺ In this blog post

Cover Image for How to escape the % (percent) sign in C"s printf
c#printf

How to escape the % (percent) sign in C"s printf

Published on September 2, 2023

# How to Escape the % (Percent) Sign in C's printf 🌟 Are you a C programmer who's struggling with escaping the pesky % sign in C's printf? Don't worry, you're not alone! Many developers face this common issue when working with printf. But fear not, we've

Blog | Matheus Mello