1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <ctype.h>
void main() {
char a[50];
int b = 1;
char *c = a;
printf("input string ? ");
fgets(a, 50, stdin);
while (*c) {
if (isspace(*c)) {
b = 1;
} else {
if (b) *c = toupper(*c);
b = 0;
}
c++;
}
printf("%s", a);
}