If you want this number (not a string), just enter the corresponding field in the structure brokentime:
time_t result;
result = time(NULL);
struct tm* brokentime = localtime(&result);
int h = brokentime->tm_hour;
If you want it to be like a string, you will have to format the string yourself (instead of using asctime):
time_t result;
result = time(NULL);
struct tm* brokentime = localtime(&result);
char hour_str[3];
strftime(hour_str, sizeof(hour_str), "%H", brokentime);
%I %H, 12- 24- .