How to convert caps to lower case in cpp?

0 votes
asked by about Dev-C++
edited by

1 Answer

0 votes
No avatar answered by (94.5k points)

To convert capital letters to lowercase in C++, you can use the tolower() function from the <cctype> library. Here is an example code snippet:

```cpp

include

include

int main() {
char character = 'A';
char lowercase = std::tolower(character);

std::cout << "Lowercase: " << lowercase << std::endl;

return 0;

}
```

This code will convert the character 'A' to lowercase 'a'.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...