(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...


(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;



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here