![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Bhanu Priya has Published 1581 Articles
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
4K+ Views
ProblemWhy sorting makes searching easier in C language? How can you judge the sorting efficiency in C?SolutionSorting is the process of arranging elements either in ascending (or) descending order.The term sorting came into existence when humans realized the importance of searching quickly.There are different things in life that we need ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
175 Views
We can write a program in C for printing some content in to the file and print the following −Number of characters entered into the file.Reverse the characters entered into the file.First, try to store number of characters into the file by opening the file in write mode.For entering data ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
9K+ Views
Random accessing of files in C language can be done with the help of the following functions −ftell ( )rewind ( )fseek ( )ftell ( )It returns the current position of the file ptr.The syntax is as follows −int n = ftell (file pointer)For example, FILE *fp; int n; _____ ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
318 Views
Some of the errors that occurs in the files are listed below −Trying to read beyond end of file.Device over flow.Trying to open an invalid file.An invalid operation is performed by opening a file in a different mode.Functions for error handlingThe functions for error handling are as follows −ferror ( ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
245 Views
In C programming language, pointer to pointer or double pointer is a variable that holds the address of another pointer.DeclarationGiven below is the declaration for pointer to pointer −datatype ** pointer_name;For example, int **p;Here, p is a pointer to pointer.Initialization‘&’ is used for initialization.For example, int a = 10; int ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
18K+ Views
File is a collection of records (or) is a place on hard disk, where data is stored permanently. By using C commands, we can access the files in different ways.Operations on filesThe operations that can be carried out on files in C language are as follows −Naming the file.Opening the ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
4K+ Views
I/O refers to the input - output functions in C language.High level I/OThese are easily understood by human beingsThe advantage is portability.Low level I/OThese are easily understood by computer.The advantage is that execution time is less.The disadvantage is that Non portability.High level I/O FunctionsThe high level input - output (I/O) ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
6K+ Views
The operations that can be carried out on files in C language are as follows −Naming the file.Opening the file.Reading from the file.Writing into the file.Closing the file.SyntaxThe syntax for opening and naming file is as follows −FILE *File pointer;For example, FILE * fptr;File pointer = fopen ("File name”, "mode”);For ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
75 Views
ProblemHow to print the long lines into two or more short lines based on specified length in the program using C Language?SolutionLet’s write a code to read a long line and print into two or more short lines according to the mentioned size in the program.The built in functions that ... Read More
![Bhanu Priya](https://www.tutorialspoint.com/assets/profiles/314653/profile/60_78287-1615027882.jpg)
Bhanu Priya
11K+ Views
Files is collection of records (or) it is a place on hard disk, where data is stored permanently.Types of FilesThere are two types of files in C language which are as follows −Text fileBinary FileText FileIt contains alphabets and numbers which are easily understood by human beings.An error in a ... Read More