Menu
Coddy logo textTech

Capitalize

Lesson 6 of 20 in Coddy's Beginner Challenges - Practice Basic Concepts course.

challenge icon

Challenge

Easy

Write a function named capitalize that gets a string (only lower case) and capitalizes the first letter of each word and prints the result.

For example,

  • this is an example  ->  This Is An Example

Try it yourself

#include <string.h>
#include <ctype.h>

char* capitalize(char* s) {
    // Write code here
}

All lessons in Beginner Challenges - Practice Basic Concepts