Cambridge IGCSE · Computer Science (0478)

Arrays: แบบฝึกหัด

ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Arrays

10 ข้อ23 คะแนนฟรี ไม่ต้องสมัคร
ข้อ 1
1 คะแนน

Which of the following describes a key characteristic of an array in pseudocode as defined in the syllabus?

ข้อ 2
1 คะแนน

A two-dimensional (2D) array is declared as DECLARE \( Grid : \textbf{ARRAY}[1:4, 1:3] \) OF INTEGER. What is the total number of elements that can be stored in this array?

ข้อ 3
1 คะแนน

A 2D array Board[1:3, 1:3] is initialized with the value 0 in all elements. The following pseudocode is executed:

FOR R \(\leftarrow\) 1 TO 3
  FOR C \(\leftarrow\) 1 TO 3
    IF R < C THEN
      Board[R, C] \(\leftarrow\) 1
    ELSE
      Board[R, C] \(\leftarrow\) 2
    ENDIF
  NEXT C
NEXT R

What are the values of Board[1, 2] and Board[2, 1] respectively?

ข้อ 4
1 คะแนน

Which description best defines an array in programming as per the IGCSE syllabus?

ข้อ 5
1 คะแนน

An array Sales[1:4, 1:3] stores the following integers:
Row 1: 10, 20, 30
Row 2: 40, 50, 60
Row 3: 70, 80, 90
Row 4: 100, 110, 120

What is the result of the expression: \( Sales[2, 3] + Sales[4, 1] \)?

ข้อ 6
3 คะแนน

Write a pseudocode statement to declare a one-dimensional (1D) array named Temperatures that can store \( 7 \) real numbers.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 7
3 คะแนน

Describe how a specific element is located and accessed within a two-dimensional (2D) array in pseudocode.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 8
5 คะแนน

A 2D array Map[1:2, 1:3] contains the following data:
Row 1: \( 10, 20, 30 \)
Row 2: \( 40, 50, 60 \)

Identify the specific pseudocode index used to access the value \( 50 \) and explain why.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 9
2 คะแนน

A software application needs to store the names of \( 20 \) different books in a library collection.

(a) Write a pseudocode statement to declare a one-dimensional (1D) array named BookTitles that can store these names.
(b) Write a single line of pseudocode to assign the string "Computer Science" to the last element of the array.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 10
5 คะแนน

A teacher wants to record the marks for 5 students in a test. The marks should be stored in an array.


(a) Declare a one-dimensional array called StudentMarks that can store 5 integer marks.


(b) Write pseudocode to input 5 integer marks from the user and store them in the StudentMarks array.


(c) After all marks have been entered, calculate and output the average mark of the students, rounded to one decimal place.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

* เนื้อหาของ thinka สร้างโดย AI อาจไม่ถูกต้องสมบูรณ์ในทุกกรณี กรุณาใช้เป็นสื่อเสริมและตรวจสอบกับเอกสารอ้างอิงอย่างเป็นทางการ

คุณเห็นเฉลยแล้ว ทีนี้มาตรวจคำตอบของคุณบ้าง

หน้านี้บอกได้ว่าคำตอบที่ดีเป็นอย่างไร แต่บอกไม่ได้ว่าคำตอบของคุณขาดอะไร thinka ตรวจข้อเขียนของคุณตามเกณฑ์ให้คะแนนจริงในราว 15 วินาที

อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ

เริ่มฝึกเลย