Archive for December, 2007

C/C++/STL/Unix Programmer Question and Answers

Posted on December 22, 2007. Filed under: Languages and Algorithms | Tags: , , , |

C++
Basic Syntax
What is the difference between pointer and reference?
Pointer and reference hold memory address as their values. The address of the reference is the address of the aliased object, and the value of the pointer is the address of the pointed object. Pointer can point to different objects during its lifetime or NULL. [...]

Read Full Post | Make a Comment ( 2 so far )

Sample Programmer Interview at Ion

Posted on December 22, 2007. Filed under: Languages and Algorithms | Tags: , |

1) Count number of binary “ones” in a sentence
int numOnes(string word) {
int length = strlen(word);
int count = 0;
for (int i = 0; i > 1;
[...]

Read Full Post | Make a Comment ( None so far )

Sample C++ Programmer Interview Questions and Answers from Goldman Sachs Equity Platform Tech

Posted on December 22, 2007. Filed under: Languages and Algorithms | Tags: , , |

The phone interview questions can be found at www.careercup.com. Below are the on-site questions.
Show me how virtual function works in C++
class base{
public:
virtual void foo(){}
};
class derived: public base{
public:
void foo(){}
};
base * a, *b;
a = new base();
a->foo() // Calls base’s foo()
b = new derived();
b->foo() [...]

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...