exercises

up

next

 

chapter 1 chapter 2 chapter 3

Home keywords c bibliography

 

exercises chapter 1

    Exercise 1:

Use the last program as a basis to determine the highest / smallest number which can be represented by the int type for any reasonable combination of the 4 modifiers

unsigned

short
signed long

    Exercise 2:

Write a program that is able to produce the following output:

1

0
2 2
3 6
4 12
5 20
... ...
19 342
20 380

(Two numbers per line, separated by a colon. First column numbers increasing from 1 to 20 in steps of 1. Figure out the formula (simple!) for the second column numbers first.)

 

solutions

 

email me: Daniel Schürmann