mGinger

Monday, March 2, 2009

CSC Chennai interview questions

I had an interview with CSC chennai last week, following are the questions asked to me:
- Which desing pattern you follows?
- What is kept in desing document?
- Which default functions are created in empty class?
- What is the need of overloading a copy constructor?
- Does default constructor invoked by default copy constructor?
- How to limit number of instances of class? or How to track running instances of a class?
- Three overloaded constructors:
class A
{
A();
A(int i);
A(int i = 10);
}
Is there any problem with this?
What will happen if 'A()' is removed due to ambiguity and 'A a2(10);' will invoke which constructor?
- How to print a linked list in reverse order?
- Inheritance:
class A
{
virtual void f1();
}
class B : public A
{
virtual void f1();
virtual void f2();
}
B *b = new A;
b->f1();
b->f2();
What will be the problem? How to invoke 'f2()' using using object of class A.
[ Actually this question was wrong or I heard this question as wrong]
- Two buckets of 5 liter and 3 liter. How to major 4 liter of water?

Tuesday, February 10, 2009

Recession time

Two years back when Stock market was up approx 22000 pts, then some body told me that one it will fall down and every body will suffer. Then I said 'why will I suffer? when I have not invested anything at all in stock market'. Then the guy said 'Keep my words you will also suffer, when it will go down. No body will remain un-affected'. And this feb-2009 I lost my job and the reason was market slump.

Recession Time "Some time you have to suffer for what you think you are un-affected." ;-)