#GESP2392. [GESP]L3-202406-Q2392-S

    ID: 647 客观题 尝试: 0 已通过: 0 难度: 3 上传者: 标签>GESP三级单选数据编码位运算字符串读代码写输出进制与数值转换

[GESP]L3-202406-Q2392-S

已知字符 '0' 的ASCII编码的十进制表示为 4848,则执行下面 C++ 代码后,输出是( )。

#include <iostream>
using namespace std;

int main() {
    string s = "0629";
    
    int n = s.length();
    int x = 0;
    for(int i = 0; i < n; i++)
        x += s[i];
    
    cout << x << endl;
    return 0;
}

{{ select(1) }}

  • 1717
  • 158158
  • 209209
  • 316316