8. What is the Advantages of Lowlevel file I/O?
Ans:
Since these functions parallel the methods that the OS uses to write to the disk, they are more efficient than the high level disk I/O functions.
Since there are fewer layers of routines to go through, low level I/O functions operate faster than their high level counterparts.
|
Ex Q1: Can include files be nested?
Ans:
Yes. Include files can be nested any number of times. As long as you
use precautionary measures , you can avoid including the same file
twice. In the past, nesting header files was seen as bad programming
practice, because it complicates the dependency tracking function of
the MAKE program and thus slows down compilation. Many of today’s
popular compilers make up for this difficulty by implementing a
concept called precompiled headers, in which all headers and
associated dependencies are stored in a precompiled state.
Many programmers like to create a custom header file that has
#include statements for every header needed for each module. This is
perfectly acceptable and can help avoid potential problems relating to
#include files, such as accidentally omitting an #include file in a
module. |
Ex 2: How many levels deep can include files be nested?
Ans::
Even though there is no limit to the number of levels of nested include
files you can have, your compiler might run out of stack space while
trying to include an inordinately high number of files. This number
varies according to your hardware configuration and possibly your
compiler.
|