第30274题 单选题
下列关于C++标准I/O函数的用法,代码片段正确且能正常输出预期结果的是?
A

int a; scanf("%d", a); printf("%d", a); // 输入5后输出5

B

char str[10]; cin >> "hello world"; cout << str; // 输出hello world

C

double num = 3.1415; printf("%.2f", num); // 输出3.14

D

int n = 100; cout << "n的值是:" + n << endl; // 输出n的值是:100

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析