Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

Program to convert capital letters to lowercase

Write an efficient algorithm to convert capital letters to lower-case. Consider following test case.
1) Given string can contain lowercase and uppercase letters.

For example.

2) Given string can contain only lowercase. Result of this case will be same as given input.

3) Given string can contain only uppercase.

4) Given string can contain lowercase,uppercase and operators.

Suppose Given straing : (WeLComE BACk). View Accepted Result.

Beforemaindata [0] W [1] e [2] L [3] C [4] o [5] m [6] E [7] [8] B [9] A [10] C [11] k [12] \0size (int) =13 Aftermaindata [0] w [1] e [2] l [3] c [4] o [5] m [6] e [7] [8] b [9] a [10] c [11] k [12] \0size (int) =13

Program to convert string to lowercase. Time complexity O(n).

Output

View process.

View steps of execution

Submit your solution in comment section.

Spread the post

Recommended Posts: