Article 16 - Basic Technical Interview Questions

Have you flustered in a recent technical interview or are you preparing for an up-coming interview? Many high-tech companies are screening candidates using textbook questions before bringing them in for further interviews. This article contains typical questions that interviewers will ask. Pay attention.

Polymorphism vs Inheritance

The two have significant differences, but also share many similarities. Hence, many people confuse and even interchange the two. This is not correct.

When one refers to polymorphism, one refers to the ability to interchange one definition with another possibly different definition, but which both share the same abstracted structure (interface). This allows for substitutability, which is the basis of inheritance and defines super and sub classes.

Hence, inheritance is a by-product of polymorphism. Inheritance is the ability of one class to be a subtype of some other super class.

Do not confuse the two, as inheritance only refers to subclasses having all of the abilities of its parent classes. While polymorphism means substitutability, which includes inheritance.

Overriding vs Overloading Functions

Overriding occurs when a subclass uses the same method signature and name as an ancestor's class method but provides an alternative definition.

Overloading, on the other hand, uses the same name for a method but a different signature. For example, having three parameters instead of two.

Classes vs Interfaces

Classes are holders of implementations (unless you refer to abstract classes, also known as pure virtual classes). Whereas interfaces provides a public structure for users to interact and change the state of the object.

Stack vs Heap

This is not a hard question, but you need to answer this correctly or your world will turn upside down like a stack, or was it the heap?

Both the heap and the stack represent memory locations in memory. Although implementations may vary, the stack usually grows downwards from the top of the allocated memory, while the heap is a group of addresses near the bottom (that typically grows upwards as necessary). This is used to maximize the available memory before a collision occurs.

The stack is often used for functionality such as function calls and returns. While the help is used to allocate additional memory during runtime that normally does not fit on the stack.

You should be able to ace the interview.

Comments (21)

Posted by anonymous - buy cipro at Friday, March 15, 2013 10:34 AM

A big thank you for your post.Really looking forward to read more. Awesome.

Posted by anonymous - order generic viagra at Friday, March 15, 2013 12:13 PM

Thanks so much for the article post.Really looking forward to read more. Cool.

Posted by anonymous - generi cialis at Friday, March 15, 2013 1:53 PM

Thanks-a-mundo for the blog post.Really looking forward to read more. Awesome.

Posted by anonymous - Buy Levitra online uk at Friday, March 15, 2013 3:33 PM

I appreciate you sharing this article post.Really looking forward to read more. Really Great.

Posted by anonymous - buy social bookmarks at Wednesday, March 20, 2013 8:14 PM

SMDIc4 Thanks-a-mundo for the article.Really looking forward to read more.

Post a comment

  • Name:
  • Post:
  • Challenge:

Register or login to post comments easier.


Vantasy World Copyright 2011 - 2017. Vantasy World is a project developed by Vantasy Online. Privacy Policy.