外企C++笔试题

匿名网友 匿名网友 发布于: 2015-08-30 00:00:00
阅读 164 收藏 0 点赞 0 评论 0

1. The first two lines output by the following program are “4” and “0012FF6C”. What are the following lines output? (5%)

int main()
{
int a[] = {2,4,6,8,10};
cout << sizeof(a[1]) << endl << &a[0] << endl << sizeof(a) << endl << a[3] << endl << &a[1] << endl << *(a+2) << endl << a << endl; return 0; } 2. What is the exact output of the following program? (5%) int main() { int init[] = {2,4,6,8,10}; vector v(init, init+5);
cout << "The vector is: "; for(int i=1;i

评论列表
文章目录