1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include <stdio.h>

int i = 42;                             // global variable i

int
main()
{
    int i = 43;                         // new local variable i
    printf("1) i = %d\n", i);           // prints 'i = 43' not 'i = 42'

    {
        int i = 44;                     // new local variable i
        printf("2) i = %d\n", i);       // prints 'i = 44' not 'i = 43'
    }
}