Exam #3 Review
(Last Mod: 27 November 2010 21:38:42 )
Links:
Material include by reference:
Bookmarks:
In addition to the topics covered on prior exams, the following are topics that are fair game for this exam:
Recursive Functions
File operations - opening/closing
Formatted I/O
Unformatted I/O
Typedef Statements
Structures
True/False
NOTE: You must explain your reasoning to receive full credit, T/F alone will only receive 1/4 credit.
1) If a file open operation using fopen() fails, then the file should be immediately closed using fclose().
2) When the name of an array is used as an argument to a function, the array is passed by reference.
3) When the name of a structure is used as an argument to a function, the structure is passed by reference.
4) The functions fread() and fwrite() need to know what type of data is being referenced.
5) The functions fprintf() and fscanf() need to know what type of data is being referenced.
6) An array can contain multiple values, but all must be of the same data type.
7) A structure can contain multiple values, but all must be of the same data type.
8) Given a recursive function, an interative function that performs the same task can always be written that will run more quickly and use less memory.
9) A recursive function need not have a non-recursive path through it in order to be successful.
10) When using printf(), the same format specifier is used for both a float and a double.
11) When using scanf(), the same format specifier is used for both a float and a double.
12) When using printf(), printing out a percent sign in the format string requires that it be escaped with a backslash just like a newline character or a double quote.
Long Answer