GeekInterview.com
Submitted Questions

Memory allocation

Asked By: masveera | Asked On: Aug 13th, 2010

Why is it suggested not to use malloc() or calloc() in C++ for memory allocation?

Answered by: ajrobb on: Sep 22nd, 2010

There may be a clash between malloc() and new as they don't HAVE to use the same heap library routines. Also, for arrays of classe objects, new invokes the default constructor. For single class objects new allows you to choose a different constructor.

Answered by: summicool007 on: Aug 21st, 2010

They cannot call contructors and destructors.

Recursion

Asked By: masveera | Asked On: Aug 13th, 2010

What is the basic principle behind recursion, other than function calling itself again & again and in which real time scenario we use it?

Answered by: jbode on: Oct 4th, 2010

The basic idea behind recursion is that you're solving one big problem by breaking it into multiple smaller, easier-to-solve problems.  This can make the algorithm easier to write and un...

Answered by: anandkumarjha on: Aug 28th, 2010

Recursion is the process of calling function again and again.During the recursion many push and pop operation is done in our registers memory. That's why recursion has very poor performance.Our compu...

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: