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
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- 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 check whether the file is JPEG file or not
- C program to find and replace a word in a File by another given word
- C program to delete a file
- C++ program to create a file
- C program for file Transfer using UDP
- 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 merge contents of two files into a third file
- C program to reverse the content of the file and print it
- C++ program to append content of one text file to another
- C Program to count the Number of Characters in a File
- C Program to count number of lines in a file
- C++ program to print unique words in a file
- Write a C program that displays contents of a given file like 'more' utility in Linux
- C Program for Lower Case to Uppercase and vice-versa in a file
- 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 firstname.lastname@example.org. 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.