Write an interactive c program that will encode or decode a line of text. To encode a line of text, proceed as follows: Convert each character, including blank spaces, to its ASCII equivalent. Generate a positive random integer. Add this integer to the ASCII equivalent of each character. The same random integer will be used for the entire line of text. Suppose that N1 represents the lowest permissible value in the ASCII code, and N2 represents the highest permissible value. If the number obtained in step 2 above exceeds N2, then subtract the largest possible multiple of N2 from this number, and add the remainder to N1. Hence the encoded number will always fall between N1 and N2, and will therefore always represent some ASCII character. Display the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text. Be certain, however, that the same random number is used in decoding as was used in encoding.
1 12854Post New CSJM Interview Questions
How do I check if a port is open?
How is the security handled in web logic j2ee connector architecture?
What is the difference between mutex and binary semaphore?
How do you design a system which is required to experience a shock force of 15G in 10 milliseconds?
What is the height of binary tree?
Difference interview sync vs async plug-ins.
I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...
Why rdt and thermocouple both give different output .and one things more, how to generate ohm or mili volt plz mail me merajalam143545@yahoo.com
How do I create a page in drupal 8?
What is the use of System.Data.DLinq.dll?
Why do we use types statement in abap programming?
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
How do you achieve singleton?
How do I manage a queue to view and delete specific messages? : BEA Weblogic
how can you make sure that network clients have the most recent windows updates installed and have other important security features such as the windows firewall enabled before they can gain full network access? : Windows server 2008