题海让大学四年没有难题
白天模式登陆

题目详情

单选题 下列程序的输出结果是( ). #include <iostream> using namespace std; int main() { char a[] = "Hello, World"; char *ptr = a; while (*ptr) { if (*ptr >= 'a' && *ptr <= 'z') cout << char(*ptr + 'A' -'a'); else cout << *ptr; ptr++; } return 0; }

A. HELLO, WORLD

B. Hello, World

C. hELLO, wORLD

D. hello, world

全国计算机等级考试(二级C++)课程封面

学科:全国计算机等级考试(二级C++)

时间:2026-03-27 17:15:12

Copyright © 2022 津ICP备2021001502号