Jun 16th, 2004, 14:54 | #1 |
Senior Member
注册日期: Jul 2004
帖子: 129
|
我刚接到电话通知要面试,是C/C++编程方面的,那位大虾有相关的网站或是文章专门讲如何准备面试和面试例题吗?好久没做过项目了,手很生,心里没底呀:(
|
|
Jun 16th, 2004, 23:06 | 只看该作者 #4 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
以前找C++工作的时候在网上疯狂搜索过C++的面试题目,现在还记得一些,不过那些网站,大多有题无解,好多题我至今也不知道什么是最佳答案,不过也许对学计算机专业的DX们很轻松,比如: 简单描述一下cfront程序的工作方式(这题我在网上也找不到答案,有解释cfront的,可是一点不简单 ) 其他记得的题目有: C++名称变异(name mangling)带来的问题是什么; struct与class的区别; 为什么C++不支持static virtual functions; new与new []的区别; C++的异常处理机制是不是跟摒弃goto相矛盾; 什么时候要用和不要用virtual destructor; #define和const的分别; pointer和reference的分别; 什么是placement new? std::auto_ptr的用法?(STL的题挺多,不过我STL很弱,记不住了) 既然可以定义virtual functions,为什么还要RTTI? static_cast和dynamic_cast的分别? 给出VTable的C语言实现。 等等,上面的题,多数我答不好,希望看到高手作答 |
|
Jun 17th, 2004, 07:50 | 只看该作者 #6 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
如果楼主申请的职位跟realtime有关,对方可能比较关心内存分配,进程通信,mutual exclusion等跟语言无关的问题,我被问到过, 使用过哪些IPC? mutex与semaphore的区别?怎样用semaphore实现mutex,或者怎样用mutex实现semaphore? 有个问题是一个朋友告诉我的,挺好玩, int global_variable = 0; 和 int global_variable; main() { global_variable = 0; } 产生的最终代码有什么主要区别? |
|
Jun 17th, 2004, 19:03 | 只看该作者 #8 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by BRIGHT moon: 正是。这方面的东西我还有些资料可以看看,可对于纯编程技巧方面就几乎一窍不通了。像你说的这个有意思的题,我就摸不到头脑了:( <HR></BLOCKQUOTE>这题我也不肯定正确答案,或者说interviewer想听的答案,有时候题目也是有上下文的。我这个朋友虽然最终被录用了,但是他感觉这题他是答错了的,我不知道后来他有没有向interviewer请教过。 他说他答的是情况1的初始化发生在情况2之前,这基本上是没话找话 我能想到的是两条: 1 情况1编译后没有赋值指令产生,情况2有,所以情况1效率略高 2 情况1和情况2中的global_variable通常会被linker置于不同的memory region,情况1放在初始化数据段(data_seg),情况2放在未初始化数据段(bss_seg/ram_seg)。由于嵌入式系统的linker产生的image很多是不可重定位的,不同region的绝对地址是事先决定的,是否初始化就隐含了把变量放到哪一个内存区域的意思,不同区域在特定平台上可能有不同的特性。 我能想到的就这么多了。 |
|
Jun 18th, 2004, 06:41 | 只看该作者 #11 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by BRIGHT moon: 可惜我就是不太熟悉C++,否则怎么会这么愁呢:) <HR></BLOCKQUOTE>有点难度,呵呵。不知道你还有多少时间,如果想从基本概念开始巩固的话,强烈推荐看Essential C++,只有200多页,Lippman的作品,最好的入门书之一,Effective系列太深了,我以为,先把Lippman的两本字典(还有一本C++ Primer)看完,再啃Effective比较好,然后学有余力的话,可以用Inside C++ Object Model之类的来消磨时间。 |
|
Jun 18th, 2004, 07:39 | 只看该作者 #12 |
Senior Member
注册日期: Jul 2004
帖子: 3,088
声望: 703208
|
To 肥得离谱の吸尘器, got couples of questions for you. 1.what platform do u do your real-time programming? Unix? or some RTOS? If so, which Unix or RTOS? Solaris or HP or something else? Using C or C++? What kind of compiler under your unix or RTOS? 2. Do u or does your company do testing as a part of SDCL? If so, how does it works? I am concerning more about system integration testing and functional testing. 3. For your real-time programming, do u focus on RF, wireless data, or something else? Thanks a lot. |
|
Jun 18th, 2004, 08:54 | 只看该作者 #13 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by cycle: 1.what platform do u do your real-time programming? Unix? or some RTOS? If so, which Unix or RTOS? Solaris or HP or something else? Using C or C++? What kind of compiler under your unix or RTOS? <HR></BLOCKQUOTE>We are using a very old pSOS version The company has a proprietary development tools chain based on SDS Cross-C tools. So C is the only language we use, although, I do believe some hardware guys use ASM. <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> 2. Do u or does your company do testing as a part of SDCL? If so, how does it works? I am concerning more about system integration testing and functional testing. <HR></BLOCKQUOTE>I have no idea what SDCL is, more familiar with SDLC though If you are talking about testing precedure, we have an independent Product Verification team, as usual, to handle all the formal test. Developer test is quite casual actually, as long as you do the documents right <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> 3. For your real-time programming, do u focus on RF, wireless data, or something else? <HR></BLOCKQUOTE>We are not in communication business at all We do automation and real-time control stuff. <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> Thanks a lot. <HR></BLOCKQUOTE>My pleasure. |
|
Jun 18th, 2004, 09:15 | 只看该作者 #14 |
Senior Member
注册日期: Jul 2004
帖子: 3,088
声望: 703208
|
Good stuff to know though. SDLC = software development Life Cycle I believe you know it somewhat since your company have an independent testing team. Still, I want know: For the test team, do you know how do they do the integration testing? I mean, do they load your guys executive code on the machine, say RTU, then do testing? or before uploading, just do some formal testing without any hardware? |
|
Jun 18th, 2004, 10:14 | 只看该作者 #15 |
Senior Member
注册日期: Jul 2004
帖子: 225
声望: 0
|
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by cycle: For the test team, do you know how do they do the integration testing? I mean, do they load your guys executive code on the machine, say RTU, then do testing? or before uploading, just do some formal testing without any hardware? <HR></BLOCKQUOTE>I'm not a testing export, but as I'm aware of, they always test code with hardware. Just curious, how do you achieve 'testing without hardware' ? You do need SOME hardware, don't you ? |
|
Jun 18th, 2004, 10:28 | 只看该作者 #16 |
Senior Member
注册日期: Jul 2004
帖子: 3,088
声望: 703208
|
Oh, it's kind of different stuff in different industy. I test software without hardware when the testing object is nothing to do the RT system, like your RTU, or GSM BTS, or switch/router...... I ask this coz I never did software test on RT system. Somehow, I hope some guys who ever do/done testing and integration testing with RT system could give a hand, talk about it. Especially, I am concerning telecom stuff, like router/switch, or GSM BTS...... <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by 肥得离谱の吸尘器: I'm not a testing export, but as I'm aware of, they always test code with hardware. Just curious, how do you achieve 'testing without hardware' ? You do need SOME hardware, don't you ? <HR></BLOCKQUOTE> |
|
Jun 19th, 2004, 08:07 | 只看该作者 #17 |
Senior Member
注册日期: Jul 2004
帖子: 129
声望: 0
|
I did something about the telecom equipment test, but I didn't know too much. According to my experience, if you test some software only realted to tasks, you would choose a kind of Integrated Development Environment to help you test on PC; otherwise, if it is something about ISR and you need the interrupt from hardware, you have to test it with hardware. So, we tested our high layer programs on PC first, then integrated them with Layer one program and tested in chip. |
|
Jun 19th, 2004, 16:40 | 只看该作者 #18 |
Senior Member
注册日期: Jul 2004
帖子: 3,088
声望: 703208
|
Thank you so much, Bright moon. That's exactly what I want to know. Can I ask you further questions on telecom product software testing? <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by BRIGHT moon: I did something about the telecom equipment test, but I didn't know too much. According to my experience, if you test some software only realted to tasks, you would choose a kind of Integrated Development Environment to help you test on PC; otherwise, if it is something about ISR and you need the interrupt from hardware, you have to test it with hardware. So, we tested our high layer programs on PC first, then integrated them with Layer one program and tested in chip. <HR></BLOCKQUOTE> |
|
Jun 20th, 2004, 11:55 | 只看该作者 #20 |
Senior Member
注册日期: Jul 2004
帖子: 3,088
声望: 703208
|
great, I am not sure what's your telecom product, somehow, I believe most telecom product develop and testing should be in the same mode. Say, for the router product here(you may put yours rather then router though). A router would have multiple functions, including routing(multiple routing protocol), firewall(multiple rules for management)...... In this case, how would you test those function component? Will you just upload whole pack of the software on to router and test each funtion by each test case on the router? Or, you would test each function component/module which is not integrated into one package on the PC? If you like, you may propose your own telecom product. |
|