Question: Write down a C program that should take a string as an input from the user. The program should ask the user for an option.

 Write down a C program that should take a string as

Write down a C program that should take a string as an input from the user. The program should ask the user for an option. Option should be a character variable, which can take values: 'u', 'U', 'I', 'L', and any other character. On the basis of the user input options the program should do the following: 1) If the option is 'u' or 'U' the input string should be converted to the uppercase string Example if the input string was "hello" the string should be changed to "HELLO". 2) If the option is 'I' or 'L', the input string should be converted to the lower case string. Example if the input string is "HELLO" the output string should be "hello". 3) For any other input option, the program should output: "Sorry incorrect option

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!