Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Interview Questions

 
 
Jatinder
Guest
Posts: n/a
 
      05-14-2004
I 'm a professional looking for the job.In interview these questions
were asked with some others which I answered.But some of them left
unanswered.Plz help.

Here are some questions on C/C++, OS internals?
Q1 . What is the use of pointer to an array?
Q2 . What is the use of array of pointers?
Q3 . What is the use of pointer to function ?
Q4 . How to print through serial port? What is Flow Control(Xon,Xoff)
?
Q5 . What is IOCTL Explain .
Q6 . How to create an interrupt service routine in C?
Q7 . What are the internals of a schedular ?
Q8 . The static variables are declared in heap or stack ?
 
Reply With Quote
 
 
 
 
Ron Natalie
Guest
Posts: n/a
 
      05-14-2004

"Jatinder" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) om...

> Q1 . What is the use of pointer to an array?
> Q2 . What is the use of array of pointers?
> Q3 . What is the use of pointer to function ?


These are almost topical, but if you can't answer them, you need to go back and read
a C text book.

> Q4 . How to print through serial port? What is Flow Control(Xon,Xoff)
> Q5 . What is IOCTL Explain .


Highly system dependent and off-topic. Ask im comp.programming.unix or whatever
target system you're dealing with.

> Q6 . How to create an interrupt service routine in C?


Ditto.

> Q7 . What are the internals of a schedular ?


What scheduler? Did they mention what OS (and just saying UNIX doesn't cut it)
they want to know about the scheduler internals of?

> Q8 . The static variables are declared in heap or stack ?


Neither.

 
Reply With Quote
 
 
 
 
Thomas Matthews
Guest
Posts: n/a
 
      05-14-2004
Jatinder wrote:
> I 'm a professional looking for the job.In interview these questions
> were asked with some others which I answered.But some of them left
> unanswered.Plz help.
>
> Here are some questions on C/C++, OS internals?
> Q1 . What is the use of pointer to an array?

One can iterate through the array using a pointer.
One can pass the location of an element by just passing the pointer.
The array can be allocated during run-time, especially when the
size is unknown at run-time.

> Q2 . What is the use of array of pointers?

Multi-dimensional array.
Allows polymorphism for families of classes.
A convenient container for objects allocated during run-time.

> Q3 . What is the use of pointer to function ?

One can have an object associated with a function to process
that object, such as factories.
Another use is to map menu items with functions to process the
selection.
Allows for more generic algorithms, such as qsort (which allows
a pointer to a comparison function).

> Q4 . How to print through serial port? What is Flow Control(Xon,Xoff)
> ?

This depends on the platform and maybe the Operating System.
The "best" way to print through a serial port is to use operating
system functions.
The Flow Control characters, Xon and Xoff, are one method to turn
on (resume) or pause (stop) transmission across the serial channel.
See also ETX, STX, Request To Send (RTS) and DTS.

> Q5 . What is IOCTL Explain .

I believe this is a platform specific structure containing details
about an I/O device.

> Q6 . How to create an interrupt service routine in C?

This requires notifying your compiler that a function is an
ISR.

> Q7 . What are the internals of a schedular ?

Depends on the platform and operating system. Fundamentally,
a schedular dispatches processes according to a given scheme,
schedule or algorithm.

> Q8 . The static variables are declared in heap or stack ?

Neither, as the _standard_ C language does not require an
implementation to have a stack or heap. On many implementations
that use a heap and stack, static variables are not declared
on the stack or heap. They are allocated in the same area
as global variables. But this depends on the implementation.


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

 
Reply With Quote
 
Xenos
Guest
Posts: n/a
 
      05-14-2004

"Jatinder" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I 'm a professional looking for the job.In interview these questions
> were asked with some others which I answered.But some of them left
> unanswered.Plz help.
>
> Here are some questions on C/C++, OS internals?
> Q1 . What is the use of pointer to an array?
> Q2 . What is the use of array of pointers?
> Q3 . What is the use of pointer to function ?
> Q4 . How to print through serial port? What is Flow Control(Xon,Xoff)
> ?
> Q5 . What is IOCTL Explain .
> Q6 . How to create an interrupt service routine in C?
> Q7 . What are the internals of a schedular ?
> Q8 . The static variables are declared in heap or stack ?


I find it alarming that this trend of giving ridiculous quizzes and tests to
interviewee is increasing. When I was young and looking for a job,
companies that did this were few. I immediately walked out of any interview
were I was asked to take such a test. Regurgitation of facts does not prove
knowledge or wisdom, and is certainly no indication of skill. For someone
with an encyclopedic memory of the C or C++ standards, I would hire for a
one-time fee of $18--the amount I would need to just purchase a copy of the
standard (or whatever it currently costs).

This topic has come up before, and I think I said pretty much the something.
Someone replied with, "So how do you know they can do the job?" Well, there
are no guarantees, but you could try *talking* to them. I never minded
being asked questions in interviews. Isn't that a major part of the
process? Ask about college courses taken and projects done. If you are
interviewing an experienced professional, ask about previous work done. How
about what problems were encountered and how they were overcome. DON'T try
and sitting me in a room with 50 other nameless applicants and presume to
give me a test. That's a company interested in bodies and tests scores, not
cultivating good people. I'm also turned off by companies that call you up
and ask for college transcripts. Unless they have taken the time to
interview me and show an interest in hiring me, I always refused.

As a result, I love the company I work for. They treat me very well, and
there is always very smart, experienced people to learn from.

DrX


 
Reply With Quote
 
Derek
Guest
Posts: n/a
 
      05-14-2004
Xenos wrote:
> I find it alarming that this trend of giving ridiculous
> quizzes and tests to interviewee is increasing. When I
> was young and looking for a job, companies that did this
> were few. I immediately walked out of any interview were
> I was asked to take such a test. Regurgitation of facts
> does not prove knowledge or wisdom, and is certainly no
> indication of skill. For someone with an encyclopedic
> memory of the C or C++ standards, I would hire for a
> one-time fee of $18--the amount I would need to just
> purchase a copy of the standard (or whatever it currently
> costs).


In general I agree with you. However, the questions
mentioned by the original poster may not be the whole
of the interview. For all you know they are just a
pre-screening and the answers should be no-brainers for
qualified applicants. My current employer took a lot of
time to get to know me, but only after I took a couple of
short written tests to make sure I was a C++ developer and
not a Perl hacker looking to learn C++ on the job.

When the economy isn't so hot there may be many applicants
for each position and some form of pre-selection may be
justified.
 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      05-14-2004
Derek wrote:
> Xenos wrote:
> > I find it alarming that this trend of giving ridiculous
> > quizzes and tests to interviewee is increasing. When I
> > was young and looking for a job, companies that did this
> > were few. I immediately walked out of any interview were
> > I was asked to take such a test. Regurgitation of facts
> > does not prove knowledge or wisdom, and is certainly no
> > indication of skill. For someone with an encyclopedic
> > memory of the C or C++ standards, I would hire for a
> > one-time fee of $18--the amount I would need to just
> > purchase a copy of the standard (or whatever it currently
> > costs).

>
> In general I agree with you. However, the questions
> mentioned by the original poster may not be the whole
> of the interview. For all you know they are just a
> pre-screening and the answers should be no-brainers for
> qualified applicants. My current employer took a lot of
> time to get to know me, but only after I took a couple of
> short written tests to make sure I was a C++ developer and
> not a Perl hacker looking to learn C++ on the job.


Shouldn't that be obvious from the resume? When employers are
being picky about whom to interview, they should put more
emphasis on reading the application documents and doing phone
screenings. Well, just MHO, of course. All OT, BTW.

V
 
Reply With Quote
 
Xenos
Guest
Posts: n/a
 
      05-14-2004

"Derek" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In general I agree with you. However, the questions
> mentioned by the original poster may not be the whole
> of the interview. For all you know they are just a
> pre-screening and the answers should be no-brainers for
> qualified applicants. My current employer took a lot of
> time to get to know me, but only after I took a couple of
> short written tests to make sure I was a C++ developer and
> not a Perl hacker looking to learn C++ on the job.
>

And that's fine. I wouldn't have minded that. But I have gone to
interviews where they didn't even interview you. *Every* applicant had the
same "interview" time. We were herded into a class room to take a length
test. No one every said "hello," and they only asked your name to check it
off a list. THAT is not a company I would have liked to work for. I left
and have never regretted it. Of course, in today economy I guess you may
have to swallow your pride a little more and suck it up. I feel sorry for
kids just out of college (and older folks out of work). In my day, lots of
good companies would fight over you.

DrX


 
Reply With Quote
 
bartek
Guest
Posts: n/a
 
      05-14-2004
"Xenos" <(E-Mail Removed)> wrote in
news:c8328f$(E-Mail Removed):

>
> "Derek" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> In general I agree with you. However, the questions
>> mentioned by the original poster may not be the whole
>> of the interview. For all you know they are just a
>> pre-screening and the answers should be no-brainers for
>> qualified applicants. My current employer took a lot of
>> time to get to know me, but only after I took a couple of
>> short written tests to make sure I was a C++ developer and
>> not a Perl hacker looking to learn C++ on the job.
>>

> And that's fine. I wouldn't have minded that. But I have gone to
> interviews where they didn't even interview you. *Every* applicant
> had the same "interview" time. We were herded into a class room to
> take a length test. No one every said "hello," and they only asked
> your name to check it off a list. THAT is not a company I would have
> liked to work for. I left and have never regretted it. Of course, in
> today economy I guess you may have to swallow your pride a little more
> and suck it up. I feel sorry for kids just out of college (and older
> folks out of work). In my day, lots of good companies would fight
> over you.


It's the sign of the times, isn't it?
Companies that actually care about their workforce are getting pretty
rare. Now it's the quantity that counts, not quality. Quality is just
such a waste of resources, just go ask the marketing people.

I wouldn't be surprised, if they actually started charging entry fees for
interview sessions.

Sorry, I couldn't resist...

--
:: bartekd [at] o2 [dot] pl

 
Reply With Quote
 
Howard
Guest
Posts: n/a
 
      05-14-2004

Anyone else notice something strange about this post? I see it comes
through San Diego State University's server (newshub.sdsu.edu). Also, the
OP has not responded in any way, with their own opinions, follow-up, or
whatever. And the OP claims to be a "professional", but asks some of the
most basic questions. Isn't anyone at least suspicious that this is really
just a student taking a test or doing homework, and trying to get free
answers to questions they're supposed to either know or research themselves?
This is at least the third time I've seen someone declare they were asking
"job interview" questions, yet it seemed suspiciously like schoolwork to me.
Am I just being paranoid, or what?

-Howard



 
Reply With Quote
 
Xenos
Guest
Posts: n/a
 
      05-14-2004

"Howard" <(E-Mail Removed)> wrote in message
news:z_8pc.58344$(E-Mail Removed)...
> Am I just being paranoid, or what?


No, you are probably on to something...


 
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