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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!