I used code blocks to make a project with main.c:
#include <stdio.h>
#include "t.h"
int main()
{
printf("%c\n", return_f('f'));
printf("%c\n", return_f(return_char(71)));
printf("%d\n", STATIC_INT);
return 0;
}
And t.h:
static int STATIC_INT = 14;
static unsigned char return_char(char n){
return (n/2 + 9);
}
unsigned char return_f(char n){
return ((n=='f' || n=='F') ? n+1 : 'f');
}
Since I assume static
should limit globals and functions to their files, how does it allow to run/print out:
g
f
14
Or is that just not how it's supposed to work?