Code Comments
Programming Forum and web based access to our favorite programming groups.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 ?
Post Follow-up to this message"Jatinder" <jsfromynr@sancharnet.in> wrote in message news:22b2a6b6.04051406 25.19a69452@posting.google.com... > 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 wha tever 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.
Post Follow-up to this messageJatinder 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
Post Follow-up to this message"Jatinder" <jsfromynr@sancharnet.in> wrote in message news:22b2a6b6.0405140625.19a69452@posting.google.com... > 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
Post Follow-up to this messageXenos 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.
Post Follow-up to this messageDerek wrote: > Xenos wrote: > > 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
Post Follow-up to this message"Derek" <none@cheese.com> wrote in message news:2gkfq4F417fgU1@uni-berlin.de... > 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
Post Follow-up to this message"Xenos" <dont.spam.me@spamhate.com> wrote in news:c8328f$7sr8@cui1.lmms.lmco.com: > > "Derek" <none@cheese.com> wrote in message > news:2gkfq4F417fgU1@uni-berlin.de... > 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
Post Follow-up to this messageAnyone 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
Post Follow-up to this message"Howard" <alicebt@hotmail.com> wrote in message news:z_8pc.58344$Ut1.1528510@bgtnsc05-news.ops.worldnet.att.net... > Am I just being paranoid, or what? No, you are probably on to something...
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.