|
-
Recent Yahoo Interview Questions - May be Helpful
Folks,
I am an experienced developer and happend to attend the interview at yahoo India development centre.
The pity part is interviewers are coming with print outs of programs written on paper. So, It is often possible you can easily overlook some of the things on the paper. But that is the fact and be prepared...
Here we go:
Question 1:
========
class A()
{
A() : { func(); }
virtual void func() { cout << "in A " << endl; }
}
class B()
{
B();
virtual void func() { cout << "in B" << endl; }
}
main()
{
B b;
}
Question: What will be printed();
Question 2: (is there any problems with following programs?)
NOTE:- there may be mistake in my typing, but you can assume
that functions are correct.
=========
string& getAccount()
{
string str(15);
return str;
}
int getVectValue(int key, vector<string> vect)
{
int value = vect.getvalue(key);
return val;
}
string getStringValue(int size)
{
string tempstr[size];
switch(size)
{
case 1:
strcpy(tempstr, "ONE");
case 2:
strcpy(tempstr,"TWO");
}
return tempstr;
}
Question 3:
=========
I was asked to implement auto_ptr equivalent with templates.
There are several Smart Pointer classes out there, you can refer them
Question 4:
=========
I was asked to write a singleton pattern program. There was a lot of discussion went in around this.
Question 5:
===========
One guy asked me following question.
Can you implement garbage collector in C++ and how you do that?
It may be possible, but to be honest, if some body can do this, it would have
been already available. May that is the research they are doing.
Question 6:
==========
There was a discussion around how a unix program will be invoked and executed from shell.
I hope this give some insights into questions they are asking.
But beware, if they are honest about your recruitment, you will surely be asked what you are supposed to do as part of your job.
In my case, since they are asking about Garbage Collector in C++...well... by now, you know the outcome of interview .....
- Jason2010
Similar Threads
-
By pravin007 in forum Java
Replies: 4
Last Post: 05-07-2013, 04:48 AM
-
By pravin007 in forum Java
Replies: 0
Last Post: 12-16-2006, 02:04 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks