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
while
B
do
C
repeat
D
for
2) An example of an unbounded loop is the
A
do
B
switch
C
If then else
D
for
3) Which loop tests the condition before executing any statements ?
A
do
B
for
C
while
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
Fclose(fp);
B
Close(fp);
C
close(fp);
D
fclose(fp);
6) Which statement checks for the end of a file?
A
feof(fp);
B
Feof(fp);
C
Eof(fp);
D
eof(fp);
7) The value assigned to the file pointer when there is an error in reading a file is
A
0
B
NULL
C
null
D
-1
8) Which loop may be terminated by a sentinel value?
A
while
B
for
C
if then
D
switch
9) The first part of the fopen statement is the
A
size of the file
B
filename
C
data type
D
mode
10) The statement to read data from a file is
A
read()
B
fscan()
C
scanf()
D
fscanf()
*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?