A.Opening a file in read mode performs which operation? a. Creates a new file b. Reads consecutive characters from a file c. Reads all the content of a file ….
Provide cross casting for Problem 7. (Hint: deﬁ ne a pointer pointing to SystemVariable.
1. Provide cross casting for Problem 7. (Hint: deﬁ ne a pointer pointing to SystemVariable. Now, make it point to an object of CompilerVariable. Dynamic cast that SystemVariable pointer to UserVariable pointer.)
2. Rewrite the DangerousFunction given in Program 11.7 in the chapter and use the same function to manipulate the string variable. (Hint: Use the same const_cast with argument char *).
3. Recall Problem 3 of Chapter 10. Now, provide typeid to check for the type of student that a student pointer is pointing to and then cast it. Provide dynamic_cast to do the same.