The fread() function returns the number of items read. This value may be less than count if the end of the file is reached or an error occurs. The fwrite() function returns the number of items written. This value will equal count unless an error occurs.
Pointer is used in the following cases
? It is used to access array elements
? It is used for dynamic memory allocation
? It is used in Call by reference
? It is used in data structures like trees, graph, linked list etc.
? The Logical Errors occur if the solution procedure for the given problem itself is wrong.
? In this case, the outputs produced by the programs would be incorrect.
? Correcting the solution procedure itself by better understanding of the problem eliminates these errors.
? The Logical Errors (if any) are to be figured out by ourselves by verifying the outputs that are produced by the program.