1. What is a virtual method? A pure virtual method? When would you use/not use a virtual destructor?
     
  2. What is the difference between a pointer and a reference?

    A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point to different objects while a reference always refers to an object with which it was initialized.

  3. What is the difference between new/delete and malloc/free?

    Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory.

  4. What does const mean?
     
  5. What methods should every c++ class define and why?
     
  6. What does main return?
     
  7. Explain what the header for a simple class looks like.
     
  8. How do you handle failure in a constructor?

    According to Bjarne Stroustup, designer of the C++ language, you handle failures in a constructor by throwing an exception. See here for more details, including a link to his document on exception safety and the standard library: http://www.arkestra.demon.co.uk/errors_cpp.html#acquire_resources_in_constructors


Junior Questions


Medior Questions

 


Senior Questions


Advanced Questions


Pre-interview Questions

 

  1. What relationship does inheritance model?
     
  2. Explain multiple inheritance.
     
  3. What is the singleton pattern? What is the abstract factory pattern? What is the iterator pattern?
     
  4. What is an abstract base class?

Commmon Knowledge Questions

General Questions

  1. What is your philospohy of programming?
     
  2. How do you know where to put code for a particular feature or piece of functionality?
     
  3. How do you try to make your programs easier to debug, maintain, and modify?
     
  4. How do you decide upon and describe the architecture for a large program?
     
  5. Describe what coupling and cohesion mean and how you use them?
     
  6. What is the difference between little and big endian? Why do you care??
     
  7. What is a shadow register??
     
  8. What is a spinlock? How is it implemented??
     
  9. What does the keyword "volatile" mean??
     
  10. How do you handle inter-task synchronization? What is a semaphore? What are the different types of semaphores?
     
  11. Explain priority inversion.
     
  12. What is network-byte order?
     
  13. What should you be aware of in an ISR?
     
  14. When do you use Task Locks, Mutex, Interrupt Locks?
     
  15. What is big O notation? How do you use it?
  16. Which do you prefer: manifest or latent types? Why?
  17. What commenting style do you think is appropriate? Why?
  18. What sort of documentation artifacts do you like to produce? Why?
  19. Do you think exceptions are good, or bad? Why?
  20. Explain transactions.
  21. What is a left outer join?
  22. Create Simple Text Calculator that takes 1+2*3 and prints 7

Professionalism Questions

  1. What publications do you read?
     
  2. What news groups do you read?
     
  3. How do maintain and improve your skill level?
     

Process Questions

  1. What is your ideal programming process? Don't give me what you have done before. What is your ideal?
  2. Describe an Agile style process.

Programming Questions

  1. Reverse a string in place
  2. Reverse a linked list
  3. Count all the bits that are on in a byte more info
  4. Binary search
  5. Find the longest run in a string
  6. atoi
  7. itoa
  8. How do you evalute the solutions to your solution? How do you know if they are good or bad?

Character Questions

  1. Do you often make mistakes? If so, tell me one you particularly remember. If somone says they don't make mistakes then they should not be hired.

Comprehension Questions

  1. Get a piece of code with a bug in it and have them find the bug and describe how they would find it. (for example )
  2. Have them explain a piece of code.
  3. Pair program with candidate on a simple problem.

 

Project Questions

  1. What are the keys to project success?

Weird Questions

  1. Explain a database to a young child.
     
  2. Explain the Internet to your grandparents
     
  3. What is your favorite web site? Why? Now improve it.
     
  4. Steve Jobs calls and asks you to improve the iPod. Go.
     
  5. Youre in a boat with a rock, on a fresh-water lake. You throw the rock into the lake.
     
  6. With respect to the land, what happens to the level of the water in the lake goes up, goes down, stays the same?
     
  7. How Would You Move Mount Fuji?
  8. Why are manhole covers round?

Advanced Questions

  1. Who is Brad Cox?
     
  2. Who is Grady Booch?
     
  3. Who is Donald Knuth?
     
  4. Who is Larry Constatine?
     
  5. Who is Parnas?
     
  6. Who is Turing?

Answers

 

What is a left outer join?

An inner join's ON condition retrieves only those records that satisfy the join condition. An outer join does the same thing but with the addition of returning records for one table in which there were no matching records in the other table.

There are three types of outer joins: left outer, right outer, and full outer. All outer joins retrieve records from both tables, just as an inner join does. However, an outer join retrieves all of the records from one of the tables. A column in the result is NULL if the corresponding input table did not contain a matching record.

The left outer join retrieves records from both tables, retrieving all the records from the left table and any records from the right table where the condition values match. If there are no matching values in from the right table, the join still retrieves all the records from the left table. Any columns from the right table that are unmatchedare left NULL. Consequently, the resulting recordset often appears to have incomplete records.

The following statement illustrates the usefulness of a left outer join:

 

SELECT Customers.CustomerID?, Customers.CompanyName?, Orders.OrderID?
FROM Customers LEFT JOIN Orders
  ON Customers.CustomerID? = Orders.CustomerID?
ORDER BY Customers.CustomerID?

The join returns all the customer records from the Customers table, and relates each customer to every order number in the Orders table. By adding the ORDER BY clause, you can easily spot those customers that haven't ordered anything. (The same statement works in the Access .mdb version of Northwind.)

 

Hosted by www.Geocities.ws

1