Question
1(A)- Modify the following cout statments to support the format specified: char name[41] = Fred; double rate = 12.34; cout < < * < <
1(A)- Modify the following cout statments to support the format specified: char name[41] = "Fred"; double rate = 12.34; cout << "*" << name << "*" << endl;; cout << "*" << rate << "*" << endl; * Fred*, right justified, 40 spaces *000012.340*, right justified, 3 digits after decimal, 10 spaces padded with 0
(B)- If Class Base has a virtual function called act(), and the Class Derived which inherits the Base class has a function called act(). 1- Is act() of Derived virtual too? 2- If Derived has another function and calls act() which act will be called, Bases or Deriveds? How can you call act() in this function to make sure the Bases act() is called
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started