1. Trang chủ
  2. » Công Nghệ Thông Tin

Giáo trình tin học chương IV

33 639 2
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 33
Dung lượng 169,32 KB

Nội dung

Giáo trình tin học chương IV

1 Chapter - Arrays Outline 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Introduction Arrays Declaring Arrays Examples Using Arrays Passing Arrays to Functions Sorting Arrays Searching Arrays: Linear Search and Binary Search Multiple-Subscripted Arrays  2003 Prentice Hall, Inc All rights reserved Arrays • Array – – – – Structures of related data items Static entity (same size throughout program) Consecutive group of memory locations Same name and type (int, char, etc.) • To refer to an element – Specify array name and position number (index) – Format: arrayname[ position number ] – First element at position • N-element array c c[ ], c[ ] … c[ n - ] – Nth element as position N-1  2003 Prentice Hall, Inc All rights reserved Arrays • Array elements like other variables – Assignment, printing for an integer array c c[ ] = 3; cout

Ngày đăng: 22/08/2012, 10:13

TỪ KHÓA LIÊN QUAN