已收录475551道考试试题

最后更新:2025-06-28

”“ 搜索结果

为您找到相关结果约475551

有以下函数模版 #include using namespace std; template void S(T &x, T &y) { T temp; temp = x; x = y; y = temp;} template void SS(T A, int n) { int min; int i, j; for (i=0; i
查看更多
下列代码执行后的输出结果为( ) int main() { char c, s; strcpy(s, "Hello,World"); printf("s=%6.9s\n", s); return 0; }
查看更多
struct Student{ int num; char name; short age; char sex; }student1; int sz = sizeof(student1); 则执行上面语句后,变量sz的值为( )
查看更多
对于如下C++程序: int main() { vector vInt(1); cout << vInt; cout << vInt.at(1); return 0; } 请问两个cout语句分别会发生什么情况()
查看更多
对于如下C++程序: int main() { vector vInt; for (int i=0; i<5; ++i) { vInt.push_back(i); cout << vInt.capacity() << " "; } vector vTmp(vInt); cout << vTmp.capacity() << "\n"; return 0; } 请问程序输出的是()
查看更多
对于如下C++程序: int main() { int a(1), b(3), c(2); while (a < b < c) { ++a; --b; --c; } cout << a << " " << b << " " << c << "\n"; return 0; } 请问输出结果是()
查看更多
public class Main { public static void main(String args) { System.out.println("A"); new Main(); new Main(); } public Main() { System.out.println("B"); } { System.out.println("C"); } static { System.out.println("D"); } } 以上程序输出的结果,正确的是?
查看更多
public class Main { private static int x = 10; private static Integer y = 10; public static void updateX(int value) { value = 3 * value; } public static void updateY(Integer value) { value = 3 * value; } public static void main(String args) { updateX(x); updateY(y); } } 执行以上程序后,x和y的值分别是多少?
查看更多
public class Main { public static void main(String args) { String s1 = "abc"; String s2 = "abc"; System.out.println(s1 == s2); String s3 = new String("abc"); System.out.println(s1 == s3); } } 执行以上程序后,输出结果正确的是?
查看更多
JAVA的类加载期负责整个生命周期内的class的初始化和加载工作,就虚拟机的规范来说,以下代码会输出什么结果? public class Test { public static void main(String args) { System.out.println(Test2.a); } } class Test2{ public static final String a="JD"; static { System.out.print("OK"); } }
查看更多