Question: Question 15 2 pts Given the following code, what is the purpose of const? class Recipe 1 Assume complete definition/ }; class CookBook ! Recipe
Question 15 2 pts Given the following code, what is the purpose of const? class Recipe 1 Assume complete definition/ }; class CookBook ! Recipe recipelist public const Recipe GetRecipest: ): const Recipe Cookbook Getkecupelisto { return recipeList: 3 To prevent changes to the recipeList variable through the returned pointer The prevent the returned pointer from being reassigned to another Recipe To protect the "this pointer inside Cookbook The protect the involding object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
