Tag: C program
Reordering C Structure Alignment
The memory footprint of C programs can be reduced by manually repacking C structure declarations. This article is about reordering the structure members in...
Be Cautious while using Bit Fields for Programming
In this article, the author tells embedded C programmers why writing code involving bit fields needs to be done carefully, failing which the results...
Write Your Own conio.h for GNU/Linux
Here's a close look at the technique and code for console handling in Standard (i.e., ISO/ANSI) C/C++. In the latter part of the article...
Joy of Programming: The Legacy of C
Dennis Ritchie died on the 8th of October 2011, at the age of 70. His lasting contributions to computing include creating the C language,...
Joy of Programming: Scope, Lifetime and Visibility in C
Often, programmers confuse the scope, lifetime and visibility of variables. So I'll cover these three important concepts in this month's column.
Whenever you declare a...
Modify-function-return-value hack! — Part 2
In my previous article on this topic, we discussed some guidelines on how to write a secure application in C. The article focused on...
Let’s Hook a Library Function
If you are a developer, and want to change the way a library function works, this article will give you a basic idea of...
Getting Started with Inotify
Inotify is a Linux kernel feature that provides an event-driven framework for applications to monitor changes in the filesystem. This article demonstrates how to...