- a. Write a struct called “Ball” with the following members: diameter (double), type_ball (String), color (String), price (double). Write a function that takes a Ball as a parameter and prints the type of ball and the price. b. Write a function that takes in diameter, type_ball, color, and price and returns a Ball object with those attributes. 2. Write a function int* addition that takes in two pointers, ptrA and ptrB, that point to integer values. Create a third pointer, ptrC, that stores the sum of the two integer values, and return ptrC. 3. Write a function void GetPassword that takes in an empty string. Your function should generate a string 8 characters long, with 2 random lowercase letters, 2 special characters ($, #, &, or @), and 4 random numbers; instead of returning the string, your function should set the input string equal to your password.
Sample Solution