How to capitalize a C string.
#include <stdio.h>
#include <ctype.h>
int main() {
int i = 0;
char str[] = "foobar";
while(str[i]) {
putchar (toupper(str[i]));
i++;
}
return(0);
}
Test it online.
solved Capitalizing a string in C