Monday 29 October 2012

C program to Convert Upper Case to Lower case and Lower Case to Upper Case in a given String

Read a string, which consists of both lower case characters and upper case characters. Convert the lowercase character into upper case and vice versa. Display the new string.

The Sample Output for this program is shown below.

In this Program we are converting upper case to lower case and lower case to upper case by using ASCII Values.ASCII stands for American Standard Code for Information Interchange.The ASCII Code for capital  'A' is 65 and Capital 'Z' is 90 where as The ASCII code for small 'a' is 97 and small 'z' is 122.The difference between the uppercase letters and lowercase letters via ASCII is 32.This program is only able to convert single words at a time.If u wanna to convert more than a word at same time then go for C Program to read a string in any case and print it in another case


Post a Comment

Related Posts Plugin for WordPress, Blogger...