Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Interview questions

Reply
Thread Tools

Interview questions

 
 
cj
Guest
Posts: n/a
 
      06-21-2004
Dear friends, I have one more questions for everyone in the newsgroup:

I am preparing for an interview on UNIX/C++. Could you please identify some
of the most important questions which might be asked, so that I could best
prepare for it?

Thank you,
C++J


 
Reply With Quote
 
 
 
 
Rufus V. Smith
Guest
Posts: n/a
 
      06-21-2004

"cj" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) s.com...
> Dear friends, I have one more questions for everyone in the newsgroup:
>
> I am preparing for an interview on UNIX/C++. Could you please identify

some
> of the most important questions which might be asked, so that I could best
> prepare for it?
>
> Thank you,
> C++J
>


Why are you being interviewed for a topic you know nothing about?

Rufus


 
Reply With Quote
 
 
 
 
cj
Guest
Posts: n/a
 
      06-21-2004
Yes. And I was hoping that folks here would be more helpful rather than
patronizing.
People are at different levels of their knowledge and at different points in
their lives...
I don't see it embarrassing to ask for help. As I was told in college "there
are no dumb questions"...
Or was gravely I misinformed?..

C++J

"Karl Heinz Buchegger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> cj wrote:
> >
> > Dear friends, I have one more questions for everyone in the newsgroup:
> >
> > I am preparing for an interview on UNIX/C++. Could you please identify

some
> > of the most important questions which might be asked, so that I could

best
> > prepare for it?
> >

>
>
> ?????
> Puzzled. You aks for help on data structures and 8-queens and are
> going to an interview ????
>
>
> --
> Karl Heinz Buchegger
> http://www.velocityreviews.com/forums/(E-Mail Removed)



 
Reply With Quote
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      06-21-2004
cj wrote:
>
> Dear friends, I have one more questions for everyone in the newsgroup:
>
> I am preparing for an interview on UNIX/C++. Could you please identify some
> of the most important questions which might be asked, so that I could best
> prepare for it?
>



?????
Puzzled. You aks for help on data structures and 8-queens and are
going to an interview ????


--
Karl Heinz Buchegger
(E-Mail Removed)
 
Reply With Quote
 
cj
Guest
Posts: n/a
 
      06-21-2004
I may or may not be interviewed for this topic, I am just trying to cover as
much ground as possible.
In this economy it's quite hard, as many of us may know.

C++J

"Rufus V. Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) s.com...
>
> "cj" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) s.com...
> > Dear friends, I have one more questions for everyone in the newsgroup:
> >
> > I am preparing for an interview on UNIX/C++. Could you please identify

> some
> > of the most important questions which might be asked, so that I could

best
> > prepare for it?
> >
> > Thank you,
> > C++J
> >

>
> Why are you being interviewed for a topic you know nothing about?
>
> Rufus
>
>



 
Reply With Quote
 
cj
Guest
Posts: n/a
 
      06-21-2004
Thank you, Karl.

"Karl Heinz Buchegger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> cj wrote:
> >
> > Yes. And I was hoping that folks here would be more helpful rather than
> > patronizing.
> > People are at different levels of their knowledge and at different

points in
> > their lives...
> > I don't see it embarrassing to ask for help. As I was told in college

"there
> > are no dumb questions"...
> > Or was gravely I misinformed?..

>
> No.
>
> But your problem seems to be equivalent to:
> 'What is the difference between all the tools in my toolchest.
> I need to know because I am going to an interview for a car-mechanic
> job'
>
> Data structures are fundamental in most programming languages. Not
> knowing the common ones disqualifies everybody immediatly for a
> programming job (in my eyes). I spent 2 semester at university to
> study various data structures and algorithms on them.
> 8-queens per se is more of academic interest, but it is often used
> as an entry point in a whole class of recursive algorithms,
> known as 'backtracking'. Again: I would expect any serious C or C++
> programmer to have programmed it at least once in his studying or
> knows how to do it or knows how to find information on the web
> about it. There must be thousends of web sites out there dealing
> with 8-queens and it is soooo easy to find them (www.google.com).
>
>
> --
> Karl Heinz Buchegger
> (E-Mail Removed)



 
Reply With Quote
 
Karl Heinz Buchegger
Guest
Posts: n/a
 
      06-21-2004
cj wrote:
>
> Yes. And I was hoping that folks here would be more helpful rather than
> patronizing.
> People are at different levels of their knowledge and at different points in
> their lives...
> I don't see it embarrassing to ask for help. As I was told in college "there
> are no dumb questions"...
> Or was gravely I misinformed?..


No.

But your problem seems to be equivalent to:
'What is the difference between all the tools in my toolchest.
I need to know because I am going to an interview for a car-mechanic
job'

Data structures are fundamental in most programming languages. Not
knowing the common ones disqualifies everybody immediatly for a
programming job (in my eyes). I spent 2 semester at university to
study various data structures and algorithms on them.
8-queens per se is more of academic interest, but it is often used
as an entry point in a whole class of recursive algorithms,
known as 'backtracking'. Again: I would expect any serious C or C++
programmer to have programmed it at least once in his studying or
knows how to do it or knows how to find information on the web
about it. There must be thousends of web sites out there dealing
with 8-queens and it is soooo easy to find them (www.google.com).


--
Karl Heinz Buchegger
(E-Mail Removed)
 
Reply With Quote
 
Mike Wahler
Guest
Posts: n/a
 
      06-21-2004

"cj" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) s.com...
> Dear friends, I have one more questions for everyone in the newsgroup:
>
> I am preparing for an interview on UNIX/C++. Could you please identify

some
> of the most important questions which might be asked, so that I could best
> prepare for it?


UNIX is not topical here, so I'll skip that.

About C++, if you are able to do all or most of
the exercises in college-level textbooks, you'll
have a reasonable chance of giving intelligent
answers to interview questions. And at least a
bit of (general programming) knowledge and/or
experience will help.

In short:

Get books. Study. Practice. Practice. Practice.

You can post your code here (with a description of
its purpose) and ask for guidance, advice, review,
and assistance.


Also Google is an excellent way to find study resources.

-Mike


 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      06-21-2004
cj wrote:
> Dear friends, I have one more questions for everyone in the newsgroup:
>
> I am preparing for an interview on UNIX/C++. Could you please identify some
> of the most important questions which might be asked, so that I could best
> prepare for it?
>
> Thank you,
> C++J




Here is one I would ask:


Is the following code guaranteed to be safe and portable?



#include <string>
#include <vector>
#include <cstddef>

int main()
{
using namespace std;

class A
{
vector<int>array;
string s;

public:
A():array(100){}
}a;


unsigned char *p=reinterpret_cast<unsigned char *>(&a);

unsigned char *v=new unsigned char[sizeof(a)];


for(size_t i=0; i<sizeof(a); ++i)
v[i]=p[i];
}






Regards,

Ioannis Vranos
 
Reply With Quote
 
E. Robert Tisdale
Guest
Posts: n/a
 
      06-21-2004
Ioannis Vranos wrote:

> Here is one I would ask:
>
> Is the following code guaranteed to be safe and portable?


> cat main.cc

#include <string>
#include <vector>
#include <cstddef>

int main(int argc, char* argv[]) {
using namespace std;

class A {
private:
vector<int> array;
string s;

public:
A(void): array(100) { }
} a;


unsigned char* p = reinterpret_cast<unsigned char *>(&a);

unsigned char* v = new unsigned char[sizeof(a)];


for(size_t i = 0; i < sizeof(a); ++i)
v[i] = p[i];

return 0;
}

> g++ -Wall -ansi -pedantic -o main main.cc
> ./main
>


Why would you ask such a question?
What would you expect it to reveal?

There is *no* guarantee that any code will be safe and portable.
Your code appears to comply with the ANSI/ISO C++ standard.
It will port almost everywhere.
Your code has no outputs and no persistent effects
and is "safe" in that sense.

My first suspicion is that you don't really know what you are doing.
I would be reluctant to accept any offer of employment
that you might make.

Perhaps you were simply attempting to be "too clever".
That's a common mistake for both programmers and managers.

If you want to test an applicant's C++ skills,
ask them to write a simple C++ program
or ask them to submit examples of C++ programs that they have written.

Don't test for understanding of subtle features of the language
unless you really need a C++ language lawyer and,
if you hire a C++ language lawyers,
don't expect them to be very productive.
You *will* be disappointed.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please come and add questions to C++ interview questions onListenVoice Vijay C++ 2 05-07-2010 03:02 PM
ASP Interview Questions ASP Interview Questions reema ASP General 0 08-26-2008 11:57 AM
.NET Interview Question, C#, ASP.NET Interview Questions dotnetuncle Javascript 0 10-30-2007 03:08 PM
Needed real interview questions marathikaka@yahoo.co.in Microsoft Certification 3 09-07-2005 12:11 AM
Interview Questions Vishal Pandey ASP .Net 0 11-24-2003 02:00 PM



Advertisments