top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

C: How can I convert uppercase to lowercase and reverse without using any standard function or method?

+3 votes
97 views
C: How can I convert uppercase to lowercase and reverse without using any standard function or method?
posted Jul 8, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+2 votes

1) Go through the entire string character by character and check the ascii value of the char.
2) If the ascii value falls in the upper case range, then make it lower case by adding 32
3) If the ascii value falls in the lower case range, then make it upper case by subtracting 32

The upper case letters are in the range 'A' to 'Z' 65 to 90
The lower case letters are in the range 'a' to 'z' 97 to 122 (see ascii tables)

answer Jul 8, 2015 by Sudeep Gopal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...