File Handling
File handling is the process of performing input and output on a file instead of the console. We can store, retrieve, and update data in a file. C supports text and binary files.
We can perform some set of operations on a file and C language provide some functions for it.
- Creating a new file – fopen() with attributes as “a” or “a+” or “w” or “w+”
- Opening an existing file – fopen()
- Reading from file – fscanf() or fgets()
- Writing to a file – fprintf() or fputs()
- Moving to a specific location in a file – fseek(), rewind()
- Closing a file – fclose()
C Cheat Sheet
This C Cheat Sheet provides an overview of both basic and advanced concepts of the C language. Whether you’re a beginner or an experienced programmer, this cheat sheet will help you revise and quickly go through the core principles of the C language.
In this Cheat Sheet, we will delve into the basics of the C language, exploring its fundamental concepts that lay the groundwork for programming. We will cover topics such as variables, data types, and operators, providing you with a solid understanding of the building blocks of C programming.
Contact Us