SlideShare a Scribd company logo
Files in C
Md. Shafiuzzaman
Lecturer, Dept. of CSE, JUST
File
• a container in computer storage devices used for storing data
Why files are needed?
• When a program is terminated, the entire data is lost. Storing in a file
will preserve your data even if the program terminates.
• If you have to enter a large number of data, it will take a lot of time to
enter them all.
• You can easily move your data from one computer to another without
any changes.
Types of Files
Text files
• Extension: .txt
• Can be created using any simple
text editors such as Notepad
• Contains plain text
Binary files
• Extension: .bin
• store data in the binary form (0's
and 1's)
File Operations
a) Creating a new file
b) Opening an existing file
c) Closing a file
d) Reading from and writing information to a file
Declaration
FILE *fptr;
Opening a file
fopen("fileopen","mode");
Opening Modes in Standard I/O
• r, rb
• w, wb
• a, ab
Closing a File
fclose(fptr)
Reading and writing to a text file
• fprint()
• fscanf()
Write to a text file
Read from a text file

More Related Content

PDF
FILES IN C
PPT
Mesics lecture files in 'c'
PPT
File in C Programming
PPTX
File handling in C by Faixan
PPT
File handling in c
PPTX
File Handling in C
PPT
PPT
file
FILES IN C
Mesics lecture files in 'c'
File in C Programming
File handling in C by Faixan
File handling in c
File Handling in C
file

What's hot (20)

PPTX
File management in C++
PPTX
file management in c language
PPTX
File Management in C
PPT
File Management
PPTX
File Handling Python
PDF
File_Management_in_C
PPTX
Data file handling in python reading & writing methods
PPTX
File Management in C
PPT
File in c
PPT
File handling in c
PPTX
basics of file handling
PPTX
COM1407: File Processing
PPTX
Data file handling in python introduction,opening & closing files
PDF
File handling and Dictionaries in python
PPT
File handling-c programming language
PPTX
File handling
DOCX
python file handling
File management in C++
file management in c language
File Management in C
File Management
File Handling Python
File_Management_in_C
Data file handling in python reading & writing methods
File Management in C
File in c
File handling in c
basics of file handling
COM1407: File Processing
Data file handling in python introduction,opening & closing files
File handling and Dictionaries in python
File handling-c programming language
File handling
python file handling
Ad

Similar to C files (20)

PPTX
File handling in C hhsjsjshsjjsjsjs.pptx
PDF
File Handling in C Part I
PPTX
File handing in C
PPTX
Programming C- File Handling , File Operation
PPTX
Topic - File operation.pptx
PPTX
files concept in c program which is very use full
PPTX
PPS-II UNIT-5 PPT.pptx
PDF
637225560972186380.pdf
PPTX
INput output stream in ccP Full Detail.pptx
PPTX
Concept of file handling in c
PDF
Module 5 file cp
PDF
VIT351 Software Development VI Unit5
PPTX
C programming ppt Sahil.pptx............
PDF
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
PPTX
File handling in c Programming - Unit 5.1
PPTX
C-FILE MANAGEMENT.pptx
PPT
file_handling_in_c.ppt
PPTX
File Handling.pptx
PPTX
WjkjkjkjkjiohuhuhiuhkhiuhkjjjjjjjjjjK-12-13-file.pptx
PPT
file_handling_in_c.ppt
File handling in C hhsjsjshsjjsjsjs.pptx
File Handling in C Part I
File handing in C
Programming C- File Handling , File Operation
Topic - File operation.pptx
files concept in c program which is very use full
PPS-II UNIT-5 PPT.pptx
637225560972186380.pdf
INput output stream in ccP Full Detail.pptx
Concept of file handling in c
Module 5 file cp
VIT351 Software Development VI Unit5
C programming ppt Sahil.pptx............
EASY UNDERSTANDING OF FILES IN C LANGUAGE.pdf
File handling in c Programming - Unit 5.1
C-FILE MANAGEMENT.pptx
file_handling_in_c.ppt
File Handling.pptx
WjkjkjkjkjiohuhuhiuhkhiuhkjjjjjjjjjjK-12-13-file.pptx
file_handling_in_c.ppt
Ad

More from Md. Shafiuzzaman Hira (20)

PPTX
Introduction to Web development
PPTX
Software measurement and estimation
PPTX
Why do we test software?
PPT
Software Requirements engineering
PPTX
Software architectural patterns
PPTX
Class based modeling
PPTX
Class diagram
PPTX
State diagram
PDF
Use case Modeling
PDF
User stories
PDF
Agile Methodology
PDF
Software Process Model
PDF
Introduction to Software Engineering Course
PPTX
PPTX
C structures
PPTX
How to Create Python scripts
PPTX
Regular expressions using Python
PPTX
Password locker project
PPTX
Dictionaries in Python
Introduction to Web development
Software measurement and estimation
Why do we test software?
Software Requirements engineering
Software architectural patterns
Class based modeling
Class diagram
State diagram
Use case Modeling
User stories
Agile Methodology
Software Process Model
Introduction to Software Engineering Course
C structures
How to Create Python scripts
Regular expressions using Python
Password locker project
Dictionaries in Python

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
PDF
Encapsulation theory and applications.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development
Encapsulation theory and applications.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Understanding_Digital_Forensics_Presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
NewMind AI Monthly Chronicles - July 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

C files