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 12898if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?
4 26318What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); }
5 22819write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
1 15962Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
1241How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
1071What is the time and space complexities of merge sort and when is it preferred over quick sort?
1040Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
1049Post New Amazon C Interview Questions
What's Collection of Bills?
What is htmlinputelement?
What is assertion in jmeter?
What are the different compression techniques in hana?
How to dived the persons AOP, AJP, BODY OF INDIVIDUALS,HUF,COMPANY-NON RESIDENT, COMPANY RESIDENT LOCLA AUTHORITY,PARTNERSHIP FIRM(meaning)
What is NEFT or RTGS?
How the ax is providing security. What are the ways?
Name the basic documents that a person requires to open an account?
design of IGBT firing circuit for 11KV
What is a multipartresolver and when it’s used?
Explain the Different types of configuration files in .net?
What does secondary name-node means?
What is JIT package?
In Dyn11 power transformer if any one of the 3 phases connected to earth in star connected side then please explain effect of the current flow in delta connected side of transformer.(In this case if one phase is shorted to ground in star connected side then we observe the current flow in two phases only not three phases in delta connected primary side. Please explain why it is so?)
What is the allowable -ve crankcase pressure (vacuum) in the gas engine of 1.5 mw?