
C语言Array 数组基础知识测验
Authored by C Programming undefined
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
声明一个长度为 5 的整型数组的正确语法是?
int array[5];
int array{5};
int[5] array;
array[5] int;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下哪一行代码正确初始化一个整型数组?
int array[] = {1, 2, 3};
int array[3] = {1, 2};
int array[3] = {1, 2, 3};
以上皆对
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
假设 int arr[5] = {0};,数组 arr 中的元素值为?
未定义
所有元素初始化为 0
只有 arr[0] 为 0,其他为随机值
编译错误
Compilation error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
如何访问数组中第三个元素(假设数组为 int arr[5])?
arr(3)
arr[2]
arr[3]
arr[1]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
数组索引的起始位置是?
0
1
2
-1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
给定数组 int arr[3] = {10, 20, 30};,arr[1] 的值是?
10
20
30
Undefined
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
若 int arr[5];,则 arr[5] 表示什么?
第六个元素
数组的最后一个元素
数组外的无效元素
编译错误
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?