Chapter 2
Compiling and Running Your First Program
Exercises
1.
Type in and run the six programs presented in this chapter.
2.
Write a program that prints the listed C facts.
3.
Write down the expected output from the following program.
Answer:
Testing.......1...2..3
4.
Write a program that subtracts the value 15 from 87 and displays the result, together with an appropriate message, at the terminal.
- [Exercise 2.4])(exercise-2-4.c)
5.
Corrected version of the faulty program shown.
6.
Write down the expected output from the following program.
Answer:
The result is 95