You are on page 1of 2

C Programming Homework

1). Define the following C Programming Terms


a)
b)
c)
d)
e)

Break Statement
Continue Statement
Loop
Counter-controlled repetition
Sentinel-controlled repetition

2). List 4 elements that a counter-controlled repetition requires


3). Complete the following diagram with what each letter represents in a C program
loop

4). for loop begins by setting counter to 1 and repeats while counter <= 10. Each
time the end of the loop is reached, counter is incremented by 1. State whether
the above sentence is True or False.
5).
for ( j = x; j <= 4 * x * y; j += y / x ) is equivalent to for ( j = 2; j <= 80; j
+= 5 ) .
State whether the above code snippet is True or False
6). Define a do..while statement.
7). What are the two common uses of a break statement.
8). What are the three common uses of a continue statement

9). Define the following logial operators


a) Logical AND
b) Logical OR
c) Logical NOT
10). What is the definition of a programmer-defined function?
11). What is the definition of a function?
12). Give 3 advantages of using functions
13). What is the definition of a parameter-list?

HAND IN ON 23rd September 2015 8:00am

You might also like