Question: The programming language is in C In this project, each student is to write a program that produces and checks a random string of letters

 The programming language is in C In this project, each student

The programming language is in C

In this project, each student is to write a program that produces and checks a random string of letters and numbers. The student should gain a better understanding of: Strings String Function(s) rand() Operation You are to write a program that creates one thousand strings of 128 random characters and numbers, one at a time, and stored in a character array str[129]. The program should use rand() to store either a letter ( 'A' to 'Z' and 'a' to 'z') or digit ('0' to '9') at all 128 positions in the string. You should use the results of rand() in such a way that there should be about an equal probability of each position in the string being either a letter or a digit. After creating each new string, your program should display the first n characters which are all valid hexadecimal digits and print out the decimal equivalent for the hex digits. Your program should also display at completion the largest and smallest hexadecimal numbers that your program created from a continuous sequence of the first n characters of each string. For example, if your program generated the string str="12A7C4J23EF9MQ2..." on the seventh loop, you should display something like HexValue [7] = 0x12A7C4 = 1,222,596 Decimal In this project, each student is to write a program that produces and checks a random string of letters and numbers. The student should gain a better understanding of: Strings String Function(s) rand() Operation You are to write a program that creates one thousand strings of 128 random characters and numbers, one at a time, and stored in a character array str[129]. The program should use rand() to store either a letter ( 'A' to 'Z' and 'a' to 'z') or digit ('0' to '9') at all 128 positions in the string. You should use the results of rand() in such a way that there should be about an equal probability of each position in the string being either a letter or a digit. After creating each new string, your program should display the first n characters which are all valid hexadecimal digits and print out the decimal equivalent for the hex digits. Your program should also display at completion the largest and smallest hexadecimal numbers that your program created from a continuous sequence of the first n characters of each string. For example, if your program generated the string str="12A7C4J23EF9MQ2..." on the seventh loop, you should display something like HexValue [7] = 0x12A7C4 = 1,222,596 Decimal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!