by Dinesh Thakur Category: C Programming (Pratical)
#include <stdio.h>
#include <conio.h>
#include <string.h>
void main(void)
    int ctr = 0;
    char string[] = "this is a test";
    printf("This is the string: \"%s\"\n", string);
    printf("Press any key to continue."); while (!kbhit());
    for(ctr = 0; ctr < strlen(string); ctr++)
            if (ctr == 0)
              string[ctr] = toupper(string[ctr]);
            if (string[ctr] == ' ')
              string[ctr + 1] = toupper(string[ctr + 1]);
    printf("\n\nThis is the new string: \"%s\".", string);

Convert the First Char of Every Word into Uppercase

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.