2026年3月 电子学会青少年软件编程C/C++二级等级考试试卷真题
答案和更多内容请查看网站【试卷中心 -----电子学会 ---- C/C ---- 二级】网站链接青少年软件编程历年真题模拟题实时更新2026年3月电子学会青少年软件编程C/C2级等级考试真题试卷一、单选题第 1 题以下代码的输出是 int x[4] {5, 10, 15, 20}; for (int i 3; i 0; i--) cout x[i] ;A.20 15 10 5B.5 10 15 20C.0 0 0 0D.无输出第 2 题以下代码的输出是 int y 2; switch (y) { case 1: cout 1; case 2: cout 2; case 3: cout 3; break; default: cout 4; }A.2B.23C.234D.4第 3 题以下代码的输出是 int a 7; int b 3; if (a % b 0) cout Divisible; else cout Not divisible;A.DivisibleB.Not divisibleC.编译错误D.无输出第 4 题以下代码的输出是 int a 10; int b 5; int c 15; if(ab ac) cout A is largest; else if (b c) cout B is largest; else cout C is largest;A.A is largestB.B is largestC.C is largestD.编译错误第 5 题以下代码的输出是 for (int i3; i0; i--) { cout i ; }A.3 2 1B.1 2 3C.3 2 1 0D.无输出答案和更多内容请查看网站【试卷中心 -----电子学会 ---- C/C ---- 二级】网站链接青少年软件编程历年真题模拟题实时更新