first ask the user to enter random characters in c string of size 20.then the seconD user will try to guess if any words are present in c string sample output: BLVLEACRSTANGUOK ENTER WORD TO SEARCH: black it is present in array
Answers
Answer:
Program to generate random alphabets
Prerequisite : rand() and srand()
Given all alphabets in a character array, print a string of random characters of given size.
We will use rand() function to print random characters. It returns random integer values. This number is generated by an algorithm that returns a sequence of apparently non-related numbers each time it is called.
Recommended: Please try your approach on {IDE} first, before moving on to the solution.
A ubiquitous use of unpredictable random characters is in cryptography, which underlies most of the schemes which attempt to provide security in modern communications (e.g. confidentiality, authentication, electronic commerce, etc).
Random numbers are also used in situations where “fairness” is approximated by randomization, such as selecting jurors and military draft lotteries.
Random numbers have uses in physics such as electronic noise studies, engineering, and operations research. Many methods of statistical analysis, such as the bootstrap method, require random numbers.
Explanation: