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;

    printf("%d\r\n", foo); //foo = 3;

    return 0;

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents