下载此文档

2021年软件工程师笔试题java面试题.docx


文档分类:IT计算机 | 页数:约5页 举报非法文档有奖
1/5
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/5 下载此文档
文档列表 文档介绍
软件工程师笔试题java面试题

  软件工程师是从事软件开发相关工作的人员的统称。下面就由xx为大家介绍一下软件工程师笔试题的文章。
  软件工程师笔试题篇1
  考察虚继承内存体系
  class A
  {
  public:
  A { coutspeak;
  delete p;
  }
  输出:
  Construct A
  Construct B
  Constuct C
  Constsruct D
  A is speaking!
  Destruct D
  Destruct C
  Destruct B
  Destruct A
  软件工程师笔试题篇2
  考察非虚析构函数
  1、class Parent
  {
  public:
  Parent{cout<<"Parent construct"<
  ~Parent{ cout<<"Parent destruct "<
  };
  class Child : public Parent
  {
  public:
  Child { cout<<"Child construct "<
  ~Child {cout<<"child destruct"<
  };
  int main
  {
  Parent *p;
  Child *c = new Child;
  p = c;
  delete p; 因为析构函数是非virtual的,故析构的时候根据指针的类型进行析构
  }
  输出:
  Parent construct
  Child Construct
  Parent destruct
  2、 考察初始化列表的写法
  class A
  {
  public:
  A(int x, int y, int z):a=x,b=y,c=z {} (1)
  A(int x, int y, int z):a(x),b(y),c(z){} (2)
  private:
  int a;
  int b;
  int c;
  };
  int main
  {
  A a(1,2,3);
  }
  软件工程师笔试题篇3
  1、考察拷贝结构函数和赋值的区分。
  class A
  {
  public:
  A { cout<<"Construct A by default"<
  A(const A& a) { cout<<"consttuct A by copy"<
  A& operator =(const A& a) { cout<<"cosnt A by operator ="<
  ~A { cout<

2021年软件工程师笔试题java面试题 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数5
  • 收藏数0 收藏
  • 顶次数0
  • 上传人读书百遍
  • 文件大小15 KB
  • 时间2021-03-31