登录
|
注册
公司
标签
文章
搜索
微软
C语言工程师
所有
有回答
没回答
新题目
有最佳答案
排序
热度
·
时间
·
经典指数
1
0
2695
下面程序执行结果: using namespace std; class A{ public: virtual void f() { cout << "A::f() "; } void f() const { cout << "A::f() const "; } }; class B : public A { public: void f() { cout << "B::f() "; } void f() const { cout << "B::f() const "; } }; void g(const A* a) { a->f(); } int main(int argc, char *argv[]) { A* p = new B(); p->f(); g(p); delete(p); return 0; } B::f() B::f() const B:: ...
阅读题目
微软
研发工程师
C语言工程师
单选题
经典指数
1
0
2617
请说出const与#define 相比,有何优点 ? 宏常量有数据类型,而const常量没有数据类型 有些集成化的调试工具可以对const 常量进行调试,但是不能对宏常量进行调试 编译器可以对const进行类型安全检查。而对#define只进行字符替换,没有类型安全检查,并且在字符替换可能会产生意料不到的错误。 ...
阅读题目
微软
C语言工程师
多选题
经典指数
1
0
2597
下面说法哪些正确: const int a; // a 是常数 int const a; // a 是常数 int const *a; // a 指向常数的指针 const int *a; // a 是常指针 int const *a; // a 是常指针 ...
阅读题目
微软
研发工程师
C语言工程师
多选题
经典指数
1
0
2558
请编写能直接实现int atoi(const char * pstr)函数功能的代码。 ...
阅读题目
微软
C语言工程师
字符串
问答题
经典指数
1
0
2554
What is the output of the following piece of C++ code? using namespace std; struct Item { char c; Item *next; }; Item *Routine1(Item *x) { Item *prev = NULL, *curr = x; while (curr) { Item *next = curr->next; curr->next = prev; prev = curr; curr = next; } return prev; } void Routine2(Item *x) { Item *curr = x; while (curr) { cout << curr->c << ” “; curr = curr->next; } ...
阅读题目
微软
研发工程师
C语言工程师
单选题
经典指数
1
0
2552
In the main() function, after ModifyString(text) is called, what’s the value of ‘text’? int FindSubString( char* pch ) { int count = 0; char * p1 = pch; while ( *p1 != '\0' ) { if ( *p1 == p1[1] - 1 ) { p1++; count++; }else { break; } } int count2 = count; while ( *p1 != '\0' ) { if ( *p1 == p1[1] + 1 ) { p1++; count2--; }else { ...
阅读题目
C语言工程师
微软
C语言工程师
单选题
经典指数
1
0
2552
In the main() function, after ModifyString(text) is called, what’s the value of ‘text’? int FindSubString( char* pch ) { int count = 0; char * p1 = pch; while ( *p1 != '\0' ) { if ( *p1 == p1[1] - 1 ) { p1++; count++; }else { break; } } int count2 = count; while ( *p1 != '\0' ) { if ( *p1 == p1[1] + 1 ) { p1++; count2--; }else { ...
阅读题目
C语言工程师
微软
C语言工程师
单选题
经典指数
1
0
2516
下面代码段的运行结果(环境linux平台, g++编译器): int main() { int x = 10; int y = 10; x = y = ++y; printf("%d %d", x, y); return 0; } 10 10 10 11 11 10 11 11 ...
阅读题目
微软
研发工程师
C语言工程师
单选题
经典指数
1
0
2498
多重继承的内存分配问题,比如有 class A : public class B, public class C {} 那么A的内存结构大致是怎么样的? ...
阅读题目
微软
C语言工程师
问答题
经典指数
1
0
2491
请编写实现malloc()内存分配函数功能一样的代码。 ...
阅读题目
微软
C语言工程师
操作系统
问答题
经典指数
<<
<
1
2
3
4
5
6
>
>>
74
题目数
1
贡献者
57
答案数
扫描后移动端查看
我也分享一个题目
"微软"公司热门职位
研发工程师
测试工程师
C#工程师
"C语言工程师"
职位热门公司
迅雷
腾讯
百度
奇虎360
华为
阿里巴巴
网易
搜狐
京东
小米
×
登录
注册
找回密码
记住登录
登录
快速注册
直接第三方登录