Module 4 Arrays, Strings, and PointersTable of ContentsCRITICAL SKILL 4.1: Use one-dimensional

Module 4 Arrays, Strings, and Pointers Table of Contents CRITICAL SKILL : Use one-dimensional arrays 2 CRITICAL SKILL : Two-Dimensional Arrays 6 CRITICAL SKILL : Multidimensional Arrays . 8 CRITICAL SKILL : Strings 11 CRITICAL SKILL : Some String Library Functions . 13 CRITICAL SKILL : Array Initialization . 17 CRITICAL SKILL : Arrays of. | Module 4 Arrays Strings and Pointers Table of Contents CRITICAL SKILL Use one-dimensional CRITICAL SKILL Two-Dimensional CRITICAL SKILL Multidimensional CRITICAL SKILL CRITICAL SKILL Some String Library CRITICAL SKILL Array CRITICAL SKILL Arrays of CRITICAL SKILL CRITICAL SKILL The Pointer CRITICAL SKILL Pointer CRITICAL SKILL Pointers and CRITICAL SKILL Multiple This module discusses arrays strings and pointers. Although these may seem to be three disconnected topics they aren t. In C they are intertwined and an understanding of one aids in the understanding of the others. An array is a collection of variables of the same type that are referred to by a common name. Arrays may have from one to several dimensions although the one-dimensional array is the most common. Arrays offer a convenient means of creating lists of related variables. The array that you will probably use most often is the character array because it is used to hold a character string. The C language does not define a built-in string data type. Instead strings are implemented as arrays of characters. This approach to strings allows greater power and flexibility than are available in languages that use a distinct string type. A pointer is an object that contains a memory address. Typically a pointer is used to access the value of another object. Often this other object is an array. In fact pointers and arrays are related to each other more than you might expect. 1 C A Beginner s Guide by Herbert Schildt CRITICAL SKILL Use one-dimensional arrays A one-dimensional array is a list of related variables. Such lists are common in programming. For example you might use a one-dimensional array to store the account numbers of the active users on a network. Another array might store the current batting averages .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.