Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
Iteration And Files
Test Description: Review of loops and files
Instructions: Answer all questions to get your test result.
1) An example of a bounded loop is the
A
repeat
B
do
C
while
D
for
2) An example of an unbounded loop is the
A
do
B
for
C
If then else
D
switch
3) Which loop tests the condition before executing any statements ?
A
while
B
do
C
for
D
repeat
4) The variable declaration for a file pointer is
A
FILE*fp;
B
FILE*fp
C
file*fp
D
file*fp;
5) Which closes a file?
A
close(fp);
B
Close(fp);
C
fclose(fp);
D
Fclose(fp);
6) Which statement checks for the end of a file?
A
Eof(fp);
B
feof(fp);
C
eof(fp);
D
Feof(fp);
7) The value assigned to the file pointer when there is an error in reading a file is
A
0
B
null
C
-1
D
NULL
8) Which loop may be terminated by a sentinel value?
A
for
B
switch
C
if then
D
while
9) The first part of the fopen statement is the
A
data type
B
size of the file
C
filename
D
mode
10) The statement to read data from a file is
A
read()
B
fscanf()
C
fscan()
D
scanf()
*select an answer for all questions
Check Results & Get Answers
Play Games with the Questions Above
Teachers: Create FREE classroom games with your questions
Click for more info!
©2007-2024
ReviewGameZone.com
|
About
|
Privacy
|
Contact
|
Terms
|
Site Map
WAIT! Find what you needed?
×
Still Looking for the Answers?
Have Another Question?
Play a Review Game with These Questions?
Want to Make Your Own Test Like This One?