30/09/2018, 16:02

Poll: Kiểm tra kiến thức C - 1.8

Các bạn thảo luận đáp án nhé, bài test lấy từ http://www.indiabix.com/online-test/c-programming-test/11

Which of the following statements are correct about an array?

1: The array int num[26]; can store 26 elements.
2: The expression num[1] designates the very first element in the array.
3: It is necessary to initialize the array at the time of declaration.
4: The declaration num[SIZE] is allowed if SIZE is a macro.
  • A. 1
  • B. 1,4
  • C. 2,3
  • D. 2,4
Nguyễn Minh Dũng viết 18:13 ngày 30/09/2018
  • 1: The array int num[26]; can store 26 elements. Đúng
  • 2: The expression num[1] designates the very first element in the array. Sai, num[0] mới đúng.
  • 3: It is necessary to initialize the array at the time of declaration. Sai, không cần thiết
  • 4: The declaration num[SIZE] is allowed if SIZE is a macro. Đúng

=> B. 1,4

Bài liên quan
0