Case conversion
Practice
3.5 (30 votes)
Basic programming
Easy
String manipulation
Problem
88% Success 7444 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given a string \(S\) in the camel case format. Your task is to convert this string into the snake case format.
Examples of the camel case strings are as follows:
- ComputerHope
- FedEx
- WordPerfect
Note: In the camel case string, the first character may or may not be capitalized.
Examples of the snake case strings are as follows:
- computer_hope
- fed_ex
- word_perfect
Input format
- First line: \(T\) denotes the number of test cases
- Next \(T\) lines: String \(S\)
Output format
For each test case, print the snake case format of the given camel case in the string \(S\) in a new line.
Constraints
\( 1 \le T \le 100 \)
\( 1 \le |S| \le 100 \), where \(|S|\) indicates the length of string \(S\)
String \(S\) is made of lower and upper case English alphabets
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
7 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation
Points:20
16 votes
Tags:
ApprovedBasic ProgrammingEasyImplementationOpen
Points:20
29 votes
Tags:
Ad-HocAlgorithmsBasic ProgrammingBasics of ImplementationEasyImplementation
Editorial
Login to unlock the editorial