18 lines
299 B
C
18 lines
299 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
/**
|
|
* @brief Function for demonstration static local variables
|
|
*/
|
|
void test_static() {
|
|
static int static_var;
|
|
static_var += 1;
|
|
printf("%d\n", static_var);
|
|
}
|
|
|
|
int main() {
|
|
test_static();
|
|
test_static();
|
|
test_static();
|
|
test_static();
|
|
exit(0);
|
|
}
|