Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Identify the correct syntax for declaring a dynamic array of characters using the above templat

  Shared By: Ava Campbell    Date: Apr 11    Category: C++ Programming    Views: 1275

Answer:

Consider the following code segment:
template <class temp>
class sample
{
……..//code
};
Identify the correct syntax for declaring a dynamic array of characters using the above template.

Options

I. sample <char> characterArray;
II. sample <datatype> characterArray;
III. temp <char> characterArray;
IV. temp <datatype> characterArray;

Answer : a) sample <char> characterArray;

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: