Question

D Question 18 4 pts A function template is an actual function that the compiler uses to generate one or more functions. True
Question 20 4 pts If inheritance is private, all members of the base class, including private members, become private members
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ans 18--> Function templates are designed for creating objects of similar pattern without specifying the type of object or function.

They save a lot of time as they are to declared only once and can be used many times according to use.

Hence it is true that a function template is an actual function that compiler used to generate other or more functions.

Ans 19--> Static methods of the class are such methods which needed class identifiers as they are called class members. If objcet is not created still they are accessible using class name.

Hence call to static methods uses the class identifier instead of object identifiers for method qualifiers.

So option c is correct.

Ans 20--> If inheritance is private that means all the members of base class will be inherited as private.

That means public and protected members will also become private and private members will remain private.

Hence given statement is true.

Ans 21--> If a exception is thrown ,the program can not jump back to throw point .so the function executing throw statement and all other calling bodies of function will terminate.

This is called unwinding the stack and it remains continue for entire chain of nested function call from throw point all back to try block.

Hence option d is correct.

Add a comment
Know the answer?
Add Answer to:
D Question 18 4 pts A function template is an actual function that the compiler uses...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In a function template, a generic data type starts with the key word _____ followed by...

    In a function template, a generic data type starts with the key word _____ followed by a parameter name that stands for the data type. template class T function Which of the following blocks is designed to catch any type of exception? catch(){ } catch(...){ } catch(*){ } catch(exception){ } A friend function can only be a regular stand-alone function and can not be a member of another class. True False A function template is an actual function that the...

  • Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts...

    Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...

  • absolute C++ QUESTION 1 Which statement is incorrect? When an event occurs that cannot be managed...

    absolute C++ QUESTION 1 Which statement is incorrect? When an event occurs that cannot be managed locally, an exception may be thrown. Throwing the exception object transfers control and information gleaned locally to some calling program unit that manages the event, or the program terminates If an exception is thrown in a function, sayf, but not handled there, the exception is propagated to the function that called fo In C++, an exception object can be a user-defined type or any...

  • Question 22 4 pts In the statement: Int'. p and q are pointer variables. True False...

    Question 22 4 pts In the statement: Int'. p and q are pointer variables. True False D Question 23 4 pts If a user-defined class object that uses mathematical operators to pass to the template function, the class must contain code for the primitive data types the constructor the overloaded operators the try/catch blocks Question 24 4 pts Afriend function is a function that is not part of a class but has access to the class's private members as well...

  • Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is...

    Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is often found in real world relationships. True False Question 2 10 pts Inheritance between a child and parent object exhibits an 'relationship. Question 3 10 pts As you move down an inheritance relationship from parent to child, you typically move from a general to specific description. True False Question 4 10 pts The syntax for declaring DerivedClass to publicly inherit from BaseClass is given...

  • In object-oriented programming, the object encapsulates both the data and the functions that operate on the...

    In object-oriented programming, the object encapsulates both the data and the functions that operate on the data. True False Flag this Question Question 101 pts You must declare all data members of a class before you declare member functions. True False Flag this Question Question 111 pts You must use the private access specification for all data members of a class. True False Flag this Question Question 121 pts A private member function is useful for tasks that are internal...

  • in c++ please include all of the following " template class, template function, singly linked list,...

    in c++ please include all of the following " template class, template function, singly linked list, the ADT stack, copy constructor, operator overloading, "try catch"and pointers Modify the code named "Stack using a Singly Linked List" to make the ADT Stack that is a template class has the code of the destructor in which each node is directly deleted without using any member function. As each node is deleted, the destructor displays the address of the node that is being...

  • Question 14 4 pts Which of the following is the general syntax of the function prototype...

    Question 14 4 pts Which of the following is the general syntax of the function prototype to overload the post-increment operator as a member function? className operator++ 0); friend className operator++(); className operator++ (int): friend className operator ++ (int); Question 15 4 pts Which of the following is a built-in operation on classes? increment assignment decrement relational Question 16 4 pts A friend function can only be a regular stand-alone function and can not be a member of another class....

  • template <class T> class Stack { public: /** clear * Method to clear out or empty any items on stack, * put stack back to empty state. * Postcondition: Stack is empty. */ virtual void clear() =...

    template <class T> class Stack { public: /** clear * Method to clear out or empty any items on stack, * put stack back to empty state. * Postcondition: Stack is empty. */ virtual void clear() = 0; /** isEmpty * Function to determine whether the stack is empty. Needed * because it is undefined to pop from empty stack. This * function will not change the state of the stack (const). * * @returns bool true if stack is...

  • Question 1 Inheritance represents what type of relationship? Is-A Has-A Was-A Composition Flag this Question Question...

    Question 1 Inheritance represents what type of relationship? Is-A Has-A Was-A Composition Flag this Question Question 2 What is the keyword used to indicate a class inheritance relationship? Flag this Question Question 3 A sub class may not access any private members of the super class by name. True False Flag this Question Question 4 What is the keyword used by a sub class to call a super class constructor? Flag this Question Question 5 When we implement the method:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT