#include <stdio.h> static int externa = 1; static void teste() { int x = 0; static int estatica = 0; x++; estatica++; } int main() { for (int i = 0; i < 10; i++) { teste(); } }
Standard input is empty
externa = 1 x = 1, estatica = 1, externa = 1 x = 1, estatica = 2, externa = 1 x = 1, estatica = 3, externa = 1 x = 1, estatica = 4, externa = 1 x = 1, estatica = 5, externa = 1 x = 1, estatica = 6, externa = 1 x = 1, estatica = 7, externa = 1 x = 1, estatica = 8, externa = 1 x = 1, estatica = 9, externa = 1 x = 1, estatica = 10, externa = 1