(10)
Question 2.2
NOTE: Pointers must be used to solve the following problem. You will 8 marks if pointers are not used, even if
the solution is correct.
Write a function createPassword() with no return value to randomly select 8 capital letters from the alphabet.
The function receives the address of the first characters of the password string as parameter.
Hint: Declare a characters string that contains all the capital letters of the alphabet and use the index values
of the characters in the string for random selection of characters, e.g.
5
char alpha [27] = “ABCDEFGHIJKLMNOPQRSTUVWXYZ”;
char *pAlpha = alpha;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here