Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Which months of this year 5 Mondays ?

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

=+applying to all or most employers and employees?

Answered: 1 week ago