编程语言单选难度 3真题改编 · 2023
368. 以下 C++ 程序的输出结果的是()
#include <iostream>
#include <map>
#include <memory>
int main(int argc, const char * argv[]) {
std::map<int, std::shared_ptr<int>> map;
std::shared_ptr<int> value1 = std::make_shared<int>(1);
map[1] = value1;
std::shared_ptr<int> value2 = std::make_shared<int>(2);
value1.swap(value2);
printf("%d\n", *value1);
printf("%d\n", *value2);
auto value3 = map[1];
printf("%d\n", *value3);
return 0;
}
练习本题 ›
综合知识iOS单选难度 3真题改编 · 2023
400. 下面代码执行结果是()
NSMutableSet *set1 = [NSMutableSet setWithArray: @[@"a",@"b",@"c"]];
NSMutableSet *set2 = [NSMutableSet setWithArray: @[@"c",@"b",@"d"]];
[set1 unionSet: set2];
[set1 intersectSet: set2];
[set2 minusSet: set1];
NSLog(@"%@ %@", set1, set2);
练习本题 ›