C Programming

Practise Exercise 3: printf() and scanf()

Only use this if you have a forms compatible browser [Note: You must have an Internet connection in order to have these tests marked]

1. The statement which prints out the value of the integer variable sum, is

2. The statement which prints out the text string "Welcome", followed by a newline, is.

3. The statement which prints out the value of the character variable letter, is

4. The statement which prints out the value of the float variable discount, is

5. The statement which prints out the value of the float variable dump using two decimal places, is

6. The statement to read a decimal value from the keyboard, into the integer variable sum, is

7. The statement to read a float value into the variable discount_rate is

8. The statement to read a single character from the keyboard into the variable operator, skipping leading blanks, tabs and newline characters, is


To submit your comments, press this button:

To clear the form, press this button:


©Copyright B Brown. 1984-1998. All rights reserved.