File Scope
suggest change#include <stdio.h> /* The identifier, foo, is declared outside all blocks. It can be used anywhere after the declaration until the end of the translation unit. */ static int foo; void test_function(void) { foo += 2; } int main(void) { foo = 1; test_function(); printf("%d\r\n", foo); //foo = 3; return 0; }
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents