main()
{
unsigned int k = 987 , i = 0;
char trans[10];
do {
trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' );
} while(k /= 16);
printf("%s\n", trans);
}
Answer Posted / dishank
deepthisivan can u plz elaborate.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of void pointer and null pointer in c language?
What is the data segment that is followed by c?
What is c language and why we use it?
What is %lu in c?
What is array in c with example?
What are the two types of structure?
Write a program of prime number using recursion.
How are variables declared in c?
What is void main ()?
Compare interpreters and compilers.
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
What is action and transformation in spark?
how to write optimum code to divide a 50 digit number with a 25 digit number??
What is a constant?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]