#A. C++字符串基础--选择题

    Type: Objective

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

选择题

  1. 在C++中,下列表达式会出现错误的是()。
  1. 在C++中,可以实现循环10次效果的是()。
  1. 下面的程序中,会输出()。
    int a[10]={1,2,3,4,5,6,7,8,9,10}; 
    cout<<a[10]<<endl;
    
  1. 下列程序输出的是()。
    string str = "Hello,CHAD"; 
    cout << str.find('A') << '\n';
    
  1. 有如下函数 fun ,则 fun(20, 12) 的返回值为()。
    int fun(int a, int b) { 
        if (a % b == 0) return b; 
        else return a; 
    }
    
  1. 下列字符数组初始化不正确的是()。
  1. 要输入一个长度不超过10的字符串(只包含大小写字母),下列代码不正确的是()。
  1. 下列关于字符数组相关函数的描述,不正确的是()。
  1. 下列关于字符串相关函数的描述,不正确的是()。
  1. 关于下列常用函数的描述,不正确的是()。

C++11月阶段测试(袁)

Not Attended
Status
Done
Rule
IOI(Strict)
Problem
3
Start at
2024-11-24 14:00
End at
2024-11-24 15:00
Duration
1 hour(s)
Host
Partic.
9