#include <stdio.h>
#include <time.h>
size_t monthName( char* buf, size_t size, int month)
{
struct tm t = {0};
t.tm_mon = month - 1; // turn month 1..12 to 0..11 as `struct tm` wants
return strftime( buf, size, "%B", &t);
}
int main(int argc, char* argv[])
{
char buf[10];
monthName( buf, sizeof( buf), 9);
printf( "%s\n", buf);
return 0;
}