C++ language
|
FAQ
- Aren't templates glorified macros?
-
If you know exceptions, aren't you worried that they could turn out to be
the modern "goto"? Why isn't it that bad in C++?
-
I would settle for "Why use const instead of #define?" as a question.
-
What's the difference between a declaration and a definition?
-
What's the difference between a struct and a class?
-
Describe for me in 100 words or less how to simulate a virtual table using
C.
-
What is the difference between delete[] and delete?
-
I need to write Wombat objects to an ostream. Describe two ways to
accomplish this and one way that won't work.
-
What's an initializer list?
-
Can you think of a 5 letter word to describe the following?
class {
int n;
public:
void setN(int);
int getN() const;
};
(One possible answer: "struct"/cpp.)
-
Describe how you extend stdio to access streams that the original
implementation never heard of (socket stream, etc.).
-
describe how you extend printf to support a new (user defined) type.
-
What is Polymorphism
-
What are the major differences between C and C++?
- What are the differences between new and malloc?
- What is the difference between delete and delete[]?
- What are the differences between a struct in C and in C++?
- What are the advantages/disadvantages of using #define?
- What are the advantages/disadvantages of using inline and const?
- What is the difference between a baller and a reference?
- When would you use a baller? A reference?
- What does it mean to take the address of a reference?
- What does it mean to declare a function or variable as static?
- What is the order of initalization for data?
- What is name mangling/name decoration?
- What kind of problems does name mangling cause?
- How do you work around them?
- What is a class?
- What are the differences between a struct and a class in C++?
- What is the difference between public, private, and protected access?
- For class CFoo { }; what default methods will the compiler generate for
you>?
- How can you force the compiler to not generate them?
- What is the purpose of a constructor? Destructor?
- What is a constructor initializer list?
- When must you use a constructor initializer list?
- What is a:
- Constructor?
- Destructor?
- Default constructor?
- Copy constructor?
- Conversion constructor?
- What does it mean to declare a/cpp.
- member function as virtual?
- member function as static?
- member function as static?
- member variable as static?
- destructor as static?
- Can you explain the term "resource acquisition is initialization?"
- What is a "pure virtual" member function?
- What is the difference between public, private, and protected inheritance?
- What is virtual inheritance?
- What is placement new?
- What is the difference between
operator new and the new operator?
- What is exception handling?
- Explain what happens when an exception is thrown in C++.
- What happens if an exception is not caught?
- What happens if an exception is throws from an object's constructor?
- What happens if an exception is throws from an object's destructor?
- What are the costs and benefits of using exceptions?
- When would you choose to return an error code rather than throw an exception?
- What is a template?
- What is partial specialization or template specialization?
- How can you force instantiation of a template?
- What is an iterator?
- What is an algorithm (in terms of the STL/C++ standard library)?
- What is std::auto_ptr?
- What is wrong with this statement?
std::auto_ptr ptr(new char[10]);
|
|
|