C/C++笔试面试题
wwkaven
这个作者很懒,什么都没留下…
展开
-
C++纠错(1)
1、#include "stdafx.h"#include using namespace std;class IntBuf{ int *m_p;public: IntBuf(int size){ m_p = new int[size]; } ~IntBuf(){ delete [] m_p; } int operator[](int i){ return原创 2014-08-18 11:26:41 · 653 阅读 · 0 评论 -
Stack
?1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950原创 2014-08-18 11:39:35 · 485 阅读 · 0 评论 -
一道关于联合(union)的笔试题
1、原题:2、原创 2014-08-12 20:15:57 · 1040 阅读 · 0 评论 -
编写一个标准strcpy函数
1、字符串的拷贝函数2、3、4、原创 2014-08-13 07:51:10 · 8456 阅读 · 0 评论 -
编写一个标准strlen函数
1、代码如下:原创 2014-08-13 08:09:21 · 2623 阅读 · 0 评论 -
构造与析构的次序
1、写出运行结果:// test1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include using namespace std;class A{public: A(){cout<<"A::A() called.\n";} virtual ~A(){cout<<"A::~A() called.\n";}};class原创 2014-08-18 11:00:03 · 677 阅读 · 0 评论 -
类、对象、指针试题
1、写出运行结果(VS2010):原创 2014-08-18 11:09:05 · 507 阅读 · 0 评论