C Programming Tutorials

C Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
Views
During C programming, file operations are pretty common. And when you are writing programs in C on Linux, two familiar terms related to file operations are File Pointers and File Descriptors. We know both are different, but what are they? This article will focus on understanding what are file...
0
4,375
The fork() unix API provides mechanism to spawn a new process from an existing process. This function is called once in a program but it returns twice. Once in parent process and once in its child process(the new spawned process becomes the child process).The return value of this function in child...
0
2,215
After writing my previous article Virus Code in Linux - C Code That Changes it's Process Name Run Time, I wondered if a process can change its name then why cannot it change its PID. And what if a process can change both its name and PID after lets say every 1 second? Well it will be a difficult...
0
4,128
malloc allocates certain amount of memory during program execution and free de-allocates memory previously allocated using a call to functions like malloc, calloc or realloc. Memory leak can occurs when a program allocates memory but does not release it. Understanding malloc() & free() ...
0
2,497
I have been writing many articles on C/Linux explaining concepts, APIs and their usage etc. This time I thought to write on a fundamental concept that every newbie should be well aware of in order to become a good coder, ie 'Good coding practices'. I have 3-4 broader level points to make here. I'll...
0
3,227
In this article we'll be learning how we can improve our C code by using Macros instead of functions. How simple functions can be converted into macros to save on some CPU instructions. Some basic knowledge of C and a little bit Assembly is considered as pre-requisites. The Code We'll be...
0
2,788
What are Hash Tables? Hash table is a data structure to store key value pairs for all situations. So it is like a table with each entry has a key and a value corresponding to it. So, it is an efficient way of mapping and accessing data. An abstract illustration of hash table: -> Data...
0
5,633