Preparing for C++ job interviews

I graduated from college a few years with a degree in a STEM field, but I am now looking for entry-level work as a software engineer. Currently, I only know C++ but I am also interested in learning ASP.NET.

A few years ago, I had a few job interviews for programmer positions that tested concepts I already learned before. However, I always failed the interviews because I hadn't used those concepts for a while and I had trouble with basic concepts. I'm sure I could do better on those interviews now.

I've spent the past few weeks trying to re-learn the basic programming concepts and syntax I've forgotten and work on some exercises and small projects. I guess the most difficult concepts I know are learning about pointers, objects, classes, vectors, and arrays. However, I have never learned about common libraries, data structures, algorithms, linked lists, binary trees, etc before. Is it really important to know these concepts for entry-level positions? Or am I better off using my time to improve my existing skills with concepts I already know (eg pointers, objects, classes)?

Or should I get started with learning ASP.NET instead? How long does it typically take to learn it well enough to do well on interviews?
job is not school. The more you know the better. You need those basic concepts for surviving at work. You'll see that there's not much teaching there and no one want to do that.

If you're interested iin ASP.NET, why not. Any practice will help you.

How long does it typically take to learn it well enough to do well on interviews?
It depends on your will/ability to learn. The more you've already learned the faster you can assimilate new techniques. Try and don't give up.

The best would be to think of a project/subject that you interested in and you will certainly face many difficulties. if you solve them they will help you with your interviews.
To start you off, here are some assignments, you can do these all in a simple console app. They are just refreshers and maybe new to you as well.

1) Write a function that takes a string, then reverses the string. Here is the signature for the function.

void ReverseString(char buf[], int length); //Now implement this to reverse the string

1a) Write a function that takes a string, then reverses the string. This time use STL, meaning don't write your own algorithm, use STL's algorithm and or std::string to do your reversal.

void ReverseString(std::string &inOut); //Now implement this

2) This task will be a little more complete, will require you to use inheritance, polymorphism, encapsulation as well as the Factory design pattern (You will almost always be asked, what design patterns you know, so it's good to know as many as you can, most entries only know the Singleton pattern).

Write a car dealership website(You wont really be creating a website, this is still a console app and the only GUI is what you display to said console). This website lets users create a custom car. Here is what you get to work with.

Auto //Your abstract base class
Car //Derives from auto
Truck //Derives from auto
AutoFactory //All this class does is create the selected car or truck instance

I'll leave the interface ideas up to you, but to get you started, things like an Engine, or number of doors as an example might be good things to expose in the interface (It doesn't matter).

Create a menu that lets the user selected what kind of auto they would like to build.

I will help you out with the Factory. Lets say everything is implemented, here are some possible choices for the factory:

AutoFactory.h
1
2
3
4
5
class AutoFactory{
   public:
      static Car * MakeCar();
      static Truck * MakeTruck();
};


This factory uses named functions to create said object. Inside the function memory is allocated for that objects type and a pointer to this memory is returned when the Factory is done with it's work.

Another way to do the factory...
AutoFactory.h
1
2
3
4
5
6
7
class AutoFactory{
   public:
      Auto * MakeAuto(int); //This is the only function exposed in the Factory
   private:
      static Car * MakeCar();
      static Truck * MakeTruck();
};


This Factory you would pass in an integer, lets call 1 a car and 2 a truck. Inside MakeAuto, depending on what was passed in as the parameter value, the appropriate call to MakeCar or MakeTruck would then be called. The difference here is that a pointer to the Base class is returned (even though that pointer references a complete derived class object.)

Good luck.
I can say surely that no one is capable to pass a C++ interview even Straustrup himself.:) As he says himself he knows C++ only about 60%.:)
Last edited on
Topic archived. No new replies allowed.