Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

1-D arrays: store, index, and traverse · ⁨1-D arrays: การเก็บข้อมูล, ดึงใช้ด้วย index, และการ遍历 (traverse)⁩

English

A row of boxes

  • An array is a row of variables of the same type, kept side by side in memory.
  • int a[5]; makes room for five ints. They are one block, reached by number.
  • You can fill them when you create them: int a[] = {10, 20, 30}; makes an array of three.
ไทย

แถวของกล่อง

  • Array (อาเรย์) คือแถวของตัวแปรชนิดเดียวกัน วางเรียงข้างกันในหน่วยความจำ
  • int a[5]; จัดสรรพื้นที่สำหรับ int จำนวนห้าตัว它们是同一块区域通过数字访问。
  • คุณสามารถเติมค่าได้ทันทีที่สร้าง: int a[] = {10, 20, 30}; สร้าง array ขนาดสาม

Handout · ⁨เอกสารประกอบการเรียน⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP