Question: Write in C language. Thanks! Problem: Given an integer to serve as a seed for the random number generator and the desired data set size,
Write in C language. Thanks!
Problem: Given an integer to serve as a seed for the random number generator and the desired data set size, generate the
specified number of random integers in the range to inclusiveAs described in the previous lab, these integers will
represent the permissions for a set of files. Each file has three permissions: Read can the user see the contents of the
file?Write can the user change the contents of the file?and eXecute can the user execute the contents of the file as a
new program?The following three rules are used to translate the permission integer into read, write, and execute
permissions:
AIf the permission integer is greater than or equal to four, then the user has Read permission for the file.
BIf the permission integer is two, three, six, or seven, then the user has Write permission for the file.
CIf the permission integer is odd, then the user has eXecute permission for the file.
The final pair of input will include two characters, the first of which will indicate to add or remove and the second
the desired permission on which to act. For examples, r would indicate ALL files should have the read permission
removed and w will add the write permission to ALL files.
Hint: this assignment requires character input following previous inputs. You will need to use the format string c
note the leading spacewhen accepting user input for the operation character, or your program will not work correctly!
Display the remaining permissions present in the data set, the number of times the permission is present among the files,
and do so in order from the permission that is least frequent to the one that is most frequent.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
