Write notes on assert(); statement.
How a pure virtual function differs from a normal virtual function?
Write a function template to multiply two numbers of different data types. (don't write full program; write only the template)
Assert statement is used as a debugging tool .it will stop the program when an error occurs.
Used for checking types, argument values, function output.
Virtual function definition exists in the base class where as pure virtual function definition donot exists in the base class.
Derived classes can override or cannot override the virtual function . If the derived classes donot override the virtual function of base class then error occurs
Function template
Void multiply
{
int a;
Float b;
Float result;
result =float (a*b);
Printf ("%f", result)
}
Get Answers For Free
Most questions answered within 1 hours.