A linked list is a collection of nodes or elements that we can traverse within the list. A node or an element is a basic structure to create a list. A node contains a data part and the address to the next node, in order to form a list. Lets’ go through the steps needed […]
C Programming – How to create and use object files?
Object files are compiled code modules useful to split large code files into small modules to enable to manage them easily. In this article, we are going to discuss the steps to create object files and use them from other code modules. When we compile a program, the ‘C’ compiler will generate object files (“.o” […]
C Programming – Using bitwise operators
‘C’ provides bitwise operators to deal with bits. Each bit is either “0” or “1”. In this article, we are going to discuss how to use bitwise operators in ‘C’. ‘C’ provides the following bitwise operators. & (Ampersand – Bitwise AND Operator) | (Pipe Symbol – Bitwise OR Operator) ^ (Cap Symbol – Bitwise XOR […]
C Programming – Other commonly used functions when dealing with files
We have discussed some of the buffered and un-buffered functions those are dealing with file management in ‘C’. In this article, we are going to discuss couple of other ‘C’ functions used for file management. Like fseek function we have lseek function which is helpful to navigate within the file. lseek function will be used […]
C Programming – Dealing with files using un-buffered functions
As part of this series of articles, we are discussing buffered and un-buffered functions dealing with file management. We already discussed buffered functions in our previous articles and started discussing un-buffered functions. We have seen open and close functions in the previous article. In this article, we will discuss a few more un-buffered file management […]
C Programming – How to use bit fields in structures?
Structures in C are used to group multiple variables of the same or different types. The variables inside the structures can be accessed through its structure variables. I recommend you to read the article, “C Programming – Understanding Structures in C“, before proceeding with this. Usually, ‘C’ structures are to group related information. ‘C’ compiler […]
C Programming – Dealing with files – How to use open function to open a file?
We have discussed that ‘C’ provides buffered and un-buffered functions for file management. We have already discussed some of the buffered functions in our previous articles; “C Programming – Dealing with files – How to read from a file?“, “C Programming – Dealing with files – How to write to the file?” and “C Programming – Dealing […]
C Programming – Dealing with files – How to fetch a record from the file?
In our previous article, we have used “getrecord” function. We will start this article with this function. We have to implement “getrecord” to fetch a record from the “employee.dat” file. It will check the “employee.dat” file for an employee record based on the given employee number. If it finds the employee record it will return […]
C Programming – Dealing with files – How to write to the file?
We have discussed opening & reading from the file in our previous Article “C Programming – Dealing with files – How to read from a file?“. fwrite function Another important buffered function, ‘C’ provides is fwrite function. fwrite function writes to the file. The file should be opened with fopen function call. The syntax of […]
C Programming – Dealing with files – How to read from a file?
C library provides a good number of file handling functions to deal with files and directories/folders. Generally, we can classify these functions as: Buffered functions and Un-buffered functions. Un-buffered functions are the raw functions that deal directly with storage devices. Whereas, buffered functions maintain memory buffers to improve the performance and reduce the number of […]