in a given string in which we toggle all characters.
Input : gfg Output : GFG Input : aBc12# Output : AbC12# Input : tu@kmiNi Output : TU@KMInI
Traverse the given string, if uppercase characters comes, convert into lowercase and lowercase latter convert into uppercase.
This article is contributed by MATHE_KA_BANDA. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Python | Toggle characters in words having same case
- C program to swap adjacent characters of a String
- Program to check if first and the last characters of string are equal
- Python program to check if a string contains all unique characters
- Java program to print all duplicate characters in a string
- Program to find the XOR of ASCII values of characters in a string
- Program to find the product of ASCII values of characters in a string
- Program to print characters present at prime indexes in a given string
- Program to find the largest and smallest ASCII valued characters in a string
- Program to count vowels, consonant, digits and special characters in string.
- Toggle case of a string using Bitwise Operators
- Rearrange the characters of the string such that no two adjacent characters are consecutive English alphabets
- Count of ungrouped characters after dividing a string into K groups of distinct characters
- Permutation of a string with maximum number of characters greater than its adjacent characters
- Min flips of continuous characters to make all characters same in a string
- String with k distinct characters and no same characters adjacent
- Create a new string by alternately combining the characters of two halves of the string in reverse
- Minimal moves to form a string by adding characters or appending string itself
- Lexicographically smallest string formed by appending a character from the first K characters of a given string
- Lexicographically smallest string formed by appending a character from first K characters of a string | Set 2