State which of the following statements are true and which are false. If a statement is false, explain why.
1) A friend function of a class template must be a function-template specialization.
2) If several class-template specializations are generated from a single class template with a single static data member, each of the class-template specializations shares a single copy of the class template’s static data member.
3) Only existing operators can be overloaded.
4) Data members or member functions declared with access specifier private are accessible to member functions of the class in which they are declared.
5) Variables declared in the body of a particular member function are known as data members and can be used in all member functions of the class.
1) False. It could be a nontemplate function.
2) False. Each class-template specialization will have its own copy of the static data member.
3) True.
4) True.
5) False. Such variables are called local variables and can be used only in the member function in which they are declared.
You might also like to view...
In a for statement, the ________ expression is executed only once.
A) initialization B) test C) repeat D) validate E) update
When you create a free Microsoft account, you must pay for cloud storage space.
Answer the following statement true (T) or false (F)
Write a short program that shows how to defeat the slicing problem.
What will be an ideal response?
Match the following terms to their meanings:
I. Enables you to adjust the bass and treble A. tracks II. The process of copying music from a CD to your hard drive B. graphic equalizer III. The process of writing files to a CD C. rip IV. Window application that manages your library of digital D. burn movies and music V. Another name for a list of songs on Windows Media Player E. Windows Media Player