/*
globa/local/nested declarations and their scope
*/
#include <stdio.h>
int i = 1000;
void change()
{
i = 10000;
printf("change: i = %4d\n", i
); }
void display()
{
printf("display: i = %4d\n", i
); }
int main()
{
int i = 100;
{
int i = 10;
}
display();
change();
display();
i = 1;
display();
}
LyoKICAgICAgZ2xvYmEvbG9jYWwvbmVzdGVkIGRlY2xhcmF0aW9ucyBhbmQgdGhlaXIgc2NvcGUKKi8KCiNpbmNsdWRlIDxzdGRpby5oPgoKaW50IGkgPSAxMDAwOwoKdm9pZCBjaGFuZ2UoKQp7CiAgICBpID0gMTAwMDA7CiAgICBwcmludGYoImNoYW5nZTogaSA9ICU0ZFxuIiwgaSk7Cn0KCnZvaWQgZGlzcGxheSgpCnsKICAgIHByaW50ZigiZGlzcGxheTogaSA9ICU0ZFxuIiwgaSk7Cn0KCmludCBtYWluKCkKewoKICBwcmludGYoIiBpID0gJTRkXG4iLCBpKTsKCiAgaW50IGkgPSAxMDA7CiAgcHJpbnRmKCIgaSA9ICU0ZFxuIiwgaSk7CgogIHsKCWludCBpID0gMTA7CiAgCXByaW50ZigiIGkgPSAlNGRcbiIsIGkpOwogIH0KCiAgZGlzcGxheSgpOwoKICBjaGFuZ2UoKTsKCiAgZGlzcGxheSgpOwogIAogIHByaW50ZigiIGkgPSAlNGRcbiIsIGkpOwogIAogIGkgPSAxOwogIAogIHByaW50ZigiIGkgPSAlNGRcbiIsIGkpOwogIAogIGRpc3BsYXkoKTsKICAKfQoKCgoKCgoKCg==