Interview Question: How Well Do You Know C++?

Sample Question #204 (programming – C++)

Explain the following C++ concepts:

  1. Implicit instantiation
  2. Explicit instantiation
  3. Explicit specialization
  4. Partial specialization

(Comment: isn’t C++ just a nasty programming language with a nasty number of nasty details?)

Advertisements
This entry was posted in Sample Qs. Bookmark the permalink.

One Response to Interview Question: How Well Do You Know C++?

  1. Brett says:

    ANSWER
     
    These concepts relate to templates in C++.
     
    1. The compiler uses a template to generate a function or class definition for a type based on what’s used in the template.
     
    2. You tell the compiler exactly what type the function or class definition should be.
     
    3. You tell the compiler to generate different function or class than based on template.
     
    4. You partially restrict the generality of a template, providing for specific types.
     
    Many advanced C++ books and website have specific examples.
     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s