Given a text file, find its size in bytes.
Input : file_name = "a.txt" Let "a.txt" contains "geeks" Output : 6 Bytes There are 5 bytes for 5 characters then an extra byte for end of file. Input : file_name = "a.txt" Let "a.txt" contains "geeks for geeks" Output : 16 Bytes
- C/C++ program to find the size of int, float, double and char
- C program to copy contents of one file to another file
- C program to delete a file
- C program for file Transfer using UDP
- C++ program to create a file
- LEX program to add line numbers to a given file
- C Program to print contents of file
- Lex program to search a word in a file
- C++ program to append content of one text file to another
- C++ program to print unique words in a file
- C Program to merge contents of two files into a third file
- C Program to count the Number of Characters in a File
- C Program to count number of lines in a file
- C Program for Maximum size square sub-matrix with all 1s
- C / C++ Program for Median of two sorted arrays of same size
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.