PAUSE
ENCORE
BOX
LESSON REVIEW
QPR1
1. Enter the command to produce an object file only
from the source file prog1.c.
QPR2
2. Which of the following is/are NOT C data types?
a char
b int
c string
d float
e a and c
f c and d
QPR3
3. Assume that i is an integer variable. A simple
for statement to print out the numbers 1-10 would be:
a for ( i = 1; i <= 10 ; i = i + 1 )
printf("%d ", i);
b for ( i = 0; i < 10 ; i = i + 1 )
printf("%d ", i);
c for ( i < 10 )
printf("%d ", i);
QPR4
4. Enter the simplest printf statement that will
print the string "Good morning".
QPR5
main()
{ for ( ; ; ) ;
printf("Hello");
}
5. The above C program:
a is illegal
b never gets out of the for loop
c prints out: Hello
QPR6
6. Using appropriate C syntax, enter the following text
in the form of a comment:
exit loop
QPR7
7. A pointer contains the _________ of a C object.
QPR8
char *strings[20];
8. Given the array definition above, which of the following
references is illegal?
a strings[0];
b strings[5];
c strings[20];
d strings[21];
e a and c
f c and d
g none of the above
RINTER
______________________________________________________________________________
$PRMT_STR$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
$F_DIAG_L1$
$F_DIAG_L2$
$F_DIAG_L3$
$S_DIAG_L1$
$S_DIAG_L2$
$S_DIAG_L3$
$REV_STR1$
$REV_STR2$
FORGET1
The correct answer is: $ANSWER$
GO