#include <stdio.h>
#define constante 0
void funcao() {
int variavel = constante;
static int estatica = constante;
variavel++;
estatica++;
printf("variavel = %d, estatica = %d\n", variavel
, estatica
); }
int main() {
for (int i = 0; i < 10; ++i) {
funcao();
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIGNvbnN0YW50ZSAwCgp2b2lkIGZ1bmNhbygpIHsKICAgIGludCB2YXJpYXZlbCA9IGNvbnN0YW50ZTsKICAgIHN0YXRpYyBpbnQgZXN0YXRpY2EgPSBjb25zdGFudGU7CiAgICB2YXJpYXZlbCsrOwogICAgZXN0YXRpY2ErKzsKICAgIHByaW50ZigidmFyaWF2ZWwgPSAlZCwgZXN0YXRpY2EgPSAlZFxuIiwgdmFyaWF2ZWwsIGVzdGF0aWNhKTsKfQoKaW50IG1haW4oKSB7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IDEwOyArK2kpIHsKICAgICAgICBmdW5jYW8oKTsKICAgIH0KfQ==
variavel = 1, estatica = 1
variavel = 1, estatica = 2
variavel = 1, estatica = 3
variavel = 1, estatica = 4
variavel = 1, estatica = 5
variavel = 1, estatica = 6
variavel = 1, estatica = 7
variavel = 1, estatica = 8
variavel = 1, estatica = 9
variavel = 1, estatica = 10