Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3: String encoder (40 Points) Write a C program to input a string from the user and encodes it into a different string of
Problem 3: String encoder (40 Points) Write a C program to input a string from the user and encodes it into a different string of same length according to the following rules. 1. Convert all the lower-case letter in it to the corresponding upper-case letter. 2. Convert all the upper-case letter in it to the corresponding lower-case letter 3. Convert each even digit in it to O' and each odd digit in it to 1 4. Keep any other character unchanged Your program must print the encoded string. You are not allowed to use any string library functions. Name your program file pa3_q3.c HINT: Read about ascii characters and its representations. Read about character arrays. Use scanf) to input the string using a character array of size 30. Example1: Enter the string Ab@#9 8760ZgYRInNc-14Sz Encoded string aB@# 10 1002GyrMn?FF4109 Encoded string h0wDY1 101 @#*IZ>Mf01 01
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started