tailieunhanh - Module 4 Arrays, Strings, and Pointers

Tham khảo tài liệu 'module 4 arrays, strings, and pointers', tài liệu phổ thông phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 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 .

TỪ KHÓA LIÊN QUAN