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 program to find the size of int, float, double and char
- C program to copy contents of one file to another file
- C program for file Transfer using UDP
- C++ program to create a file
- C program to delete a file
- Lex program to search a word in a file
- LEX program to add line numbers to a given file
- C Program to print contents of file
- C Program to count number of lines in a file
- C++ program to print unique words 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
- Find sum of integers in a file which contains any characters
- C Program for Lower Case to Uppercase and vice-versa in a file
- Write a C program that displays contents of a given file like 'more' utility in Linux
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.