题目详情
单选题 Analyze the following code.#include <iostream>using namespace std;int main( ) { int x[3]; cout << "x[0] is " << x[0]; return 0;}
A. The program has a compile error because the size of the array wasn't specified when declaring the array
B. The program has a runtime error because the array elements are not initialized
C. The program runs fine and displays x[0] is 0
D. The program has a runtime error because the array element x[0] is not defined
E. x[0] has an unpredictable value

学科:C++语言程序设计
时间:2023-12-03 05:55:23
相关题目
相关作业
