ok i need to do a program that inputs a amount of characters. my program has to capitalize the first letter and and letter after a full stop. any ideas and hints how to do it?

Recommended Answers

All 2 Replies

Do something like this:

Loop through all the chars
if the previous char was a full stop, and the current char is between 'a' and 'z' subtract 32 from it to make it uppercase (click)

Try implementing this in code, and come back if you have questions!

Niek

and the current char is between 'a' and 'z' subtract 32 from it to make it uppercase

Lame old hack from decades past superceded decades ago by toupper .

commented: C Standards all the way +7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.