面试可能在C ++上提出的问题 [英] Interview Questions that may be asked on C++

查看:106
本文介绍了面试可能在C ++上提出的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我打算参加面试,换掉我现在的公司,我不想错过任何机会,也不想做好准备。



如果你能提出几个问题(如果你有时间的话)可能会问C ++和MFC

< br $> b $ b

感谢你,

Abhishek

Hi,

I am planning to attend an interview for changing my present company and I don't want to missed any chances and like to be prepared.

It would be helpful for me if you can contribute few questions(In case you have time) that may asked on C++ & MFC


Thanking you,
Abhishek

推荐答案

这完全取决于面板。但我建议你去了解基础知识。



我不知道你的经历。不过,您应该知道任何C ++,MFC人员应该知道的重要主题。



1. OOPS概念

2.多线程

3.文档/视图架构

4.虚拟功能

5.链接列表

6.数据结构

7.设计模式

8. UML

9.关于数据类型的基本C和C ++问题

9.指针和参考文献以及列表继续...



一切顺利。
It completely depends on the panel. But i would suggest go with the basics.

I dont know the kind of experience that you have. Nevertheless, You should be knowing the important topics that any C++,MFC person should know.

1. OOPS Concepts
2. Multithreading
3. Doc/View Architecture
4. Virtual Functions
5. Link Lists
6. Data Structures
7. Design Patterns
8. UML
9. Basic C and C++ questions on Datatypes
9. Pointers and References and the list goes on...

All the best.


首先,准备面试的最佳方式是去充实。只要看看人们想让你知道什么样的事情,然后总是要求他们提供反馈。大多数采访者都很坦率地说他们认为你做得好不好。



每当我采访某人需要C ++编码的工作时,就会说几句当我们开始采访的技术部分时,我总是会问这些问题。它们是很多人知道的一个很好的初步晴雨表。



1.告诉我你如何为一个类写一个异常安全赋值运算符?



2.假设您有一个整数的文本文件。你将如何打开文件,为每个数字添加一个并将它们写回文件?



[继续让候选人改进他们的答案,直到它变为打开几个文件另一行]



第一个显示他们已经了解异常如何与其他C ++交互工作以及一些关于RAII的知识。所有关于它的细节都可以在Herb Sutter的第一部分Exceptional C ++中找到。



第二个显示他们是否曾经使用过STL和以任何有意义的方式流。最后的三行解决方案(没有错误检查)类似于:



First off the best way of preparing for an interview is to go to plenty. Just see what sort of things people want you to know and always ask them for feedback afterwards. Most interviewers are pretty candid about what they think you did well or not.

That being said whenever I interview someone for a job that requires C++ coding there are a couple of questions I always ask when we get to the technical bit of the interview started. They're a good initial barometer of how some much someone knows.

1. Tell me how you'd generally write an exception safe assignment operator for a class?

2. Say you've got a text file of integers. How would you open the file, add one to each number and write them back out to a file?

[Keep getting the candidate to refine their answer until it's down to open a couple of files one other line]

The first one shows they've got some understanding of how exceptions interact with the rest of C++ works and a bit about RAII. All the details about it can be found in the first chunk of "Exceptional C++" by Herb Sutter.

The second one shows if they've ever used the STL and streams in any meaningful way. The final three line solution (without error checking) is something like:

std::ifstream input( "input.txt" );
std::ofstream output( "output.txt" );

std::transform( std::istream_iterator<int>( input ),
                std::istream_iterator<int>(),
                std::ostream_iterator<int>( output, " " ),
                std::bind2nd( std::plus<int>(), 1 ) );





无论如何,不​​知道这是不是很多人会帮忙,但总是很方便!



干杯,



Ash



Anyway, no idea if this lot'll help but it's always handy to know!

Cheers,

Ash


这篇关于面试可能在C ++上提出的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆