Source: https://www.ms.sapientia.ro/~manyi/teaching/c /CPP_v1.2.pdf