The language itself doesn't say anything about the purpose of a file, that's up to the programmer to decide.
The header file for random functions ( like rand(), srand() ) is stdlib.h in C and cstdlib in C++.
The C programming language provides many standard library functions for file input and output. These functions make up the bulk of the C standard library header <stdio.h>. The I/O functionality of C is fairly low-level by modern standards; C abstracts all file operations into operations on streams of bytes, which may be "input streams" or "output streams". Unlike some earlier programming languages, C has no direct support for random-access data files; to read from a record in the middle of a file, the programmer must create a stream, seek to the middle of the file, and then read bytes in sequence from the stream.
7. A computer can move directly to any file on a(n) ___________ access device. a. random b. optical c. laser d. sequential the answer is a. =]
There are no access specifiers in C. All functions and data are public.
No, main.c does not require a header file. When you have a ".c" and ".h" pair, the ".h" file is to declare the existence of functions that are defined in the ".c" files so that these functions can be called in other files. since "main.c" needs the headers of the other modules (to access their data types and functions) but usually doesn't have a header file itself.Header files aren't "called", they are "included",but usually not inside any function.
it is a file (C/windows/exe/daw/evdll) is sum random file :)
seek() and tell()
Header files allow a C source file to use functions in other C files or library files. The linker ignores the fact that these functions are not defined in C source code, assuming that they'll be defined somewhere else. "stdlib" offers prototypes for many functions that deal with string conversion, pseudo-random number generation, dynamic memory management, program environment, integer math and other functions not available within the C standard. See the related link below for a list of function prototypes offered by stdlib.h.
There is no difference in the files, only in the way they are accessed. Sequential files are accessed just like they sound, sequentially, which means the if you want to read something that starts at byte number 40,000, you have to read and ignore the first 39,999 bytes. Random-access files, however, allow you to go directly to the exact location you want. Sequential access is normally used if the file is stored on a medium which doesn't allow random access. For example, if the file is stored on tape, you have to start reading from the beginning of the tape, until you get to the location you want. If you're using a hard disk, however, the head that reads and writes the disc can be moved directly to the portion of the file you want, making it faster to get the data you want.
A header file is used in some languages to declare functions that will be used but are not yet defined in the current source code. This is primarily used by C and C++, and usually for library functions and user-defined functions that are stored in separate files and folders than the main source code file.
Header File in C/C++ are the files which contains the definition of the pre-defined functions, data-types & constants, etc. By adding the header file you reduce your job of defining the same functions which are defined earlier by someone else & you can use those functions/data-types easily.
They are very important. The most commonly used functions are the string and file handling ones.