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 12953Post New CSJM Interview Questions
What is umbrella header?
What contaminants are affecting fisheries?
How many keywords are there in c?
Which best describes the load files into stack command?
How can you access different databases temporarily?
Is primary key an index?
What is difference between calling start() and run() method of thread?
What happen when you enable grid option avilable at session level ? (Ans found: Scalabily . A single session Parallelization) But how can one session is sharable among different nodes at the same time while running ?
Why swift is better than objective c?
Tell me what is the difference between starting a string with single quote and double quote? What you will use in general instance?
What is the advantage of typescript?
What is the difference between isr & function call?
Brief about the command nn?
Different between Abstract and Concrete Class?
what types of documents we need to write the nonfuntional test scripts?