C Programming Question and Answers
45. | What is the difference between typedef and macros? |
---|---|
|
|
46. | What is the advantage of a random file? |
---|---|
If the amount of data stored in a file is fairly large, the use of random access will allows you to search through it quicker. If it had been a sequential access file, you would have goto through one record at a time until you reach the target data. A random access file lets you jump directly to the target address where data is located. | |
47. | What is the general form of a C program? |
---|---|
A C program begins with the preprocessor directives, in which the programmer would specify which header file and what constants (if any) to be used. This is followed by the main function heading. Within the main function lies the variables declaration and program statements. | |
48. | What is dynamic data structures? |
---|---|
Dynamic data structure provides a means for storing data more efficiently into memory. Using dynamic memory allocation, your program will access memory spaces as needed. This is in contrast to static data structure, wherein the programmer has to indicate a fix number of memory space to be used in the program. | |