Dynamic memory allocation in C programming

Dynamic memory allocation refers to the process of manual memory management (allocation and deallocation). Dynamic memory allocation in C is performed via a group of built-in functions malloc(), calloc(), realloc() and free(). Some text also refer Dynamic memory allocation as Runtime memory allocation.

Read more

10 cool bitwise operator hacks and tricks every programmer must know

Bitwise operators are used to manipulate data at its lowest level (bit level). Data in memory (RAM) is organized as a sequence of bytes. Each byte is a group of eight consecutive bits. We use bitwise operators whenever we need to manipulate bits directly. In this post I will show you some cool bitwise operator hacks and tricks. These hacks will boost your programming skill.

Read more

File handling exercises and solutions in C

Files are used to store data permanently on hard disk. C programming supports built in library function to interact with files and directories. I have compiled a list of file handling exercises with solution for beginners and intermediate programmers.

Read more

C program to list all files in a directory recursively

Write a C program to list all files in a directory. How to list all files in a directory recursively. How to use readdir() function to list all files in a directory recursively. Logic to list all files and sub-directories of a directory in C programming. How to use opendir(), readdir() and closedir() library functions.

Read more