第31116题 单选题
以下C++代码运行后,变量res的最终值是?
#include <iostream>
using namespace std;
int main() {
    int a = 5;
    int b = 3;
    bool res;
    if (a = b) {
        res = true;
    } else {
        res = false;
    }
    return 0;
}
A

true

B

false

C

编译报错

D

运行时异常

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