Chapter 5 - Pointers and Strings

Pointer variables: Contain memory addresses as values, Normally, variable contains specific value (direct reference), Pointers contain address of variable that has specific value (indirect reference) countPtr count count 7 Indirection: Referencing value through pointer | 1 Chapter 5 - Pointers and Strings Outline Introduction Pointer Variable Declarations and Initialization Pointer Operators Calling Functions by Reference Using const with Pointers Bubble Sort Using Pass-by-Reference Pointer Expressions and Pointer Arithmetic Relationship Between Pointers and Arrays Arrays of Pointers Function Pointers Introduction to Character and String Processing Fundamentals of Characters and Strings String Manipulation Functions of the StringHandling Library 2003 Prentice Hall Inc. All rights reserved. 2 Pointer Variable Declarations and Initialization Pointer variables - Contain memory addresses as values count - Normally variable contains specific value direct reference - Pointers contain address of variable that has specific value indirect reference countPtr count Indirection k 7 - Referencing value through pointer Pointer declarations - indicates variable is pointer int myPtr declares pointer to int pointer of type int - Multiple pointers require multiple asterisks int myPtr1 myPtr2 2003 Prentice Hall Inc. All rights reserved. 3 Pointer Variable Declarations and Initialization Can declare pointers to any data type Pointer initialization - Initialized to 0 NULL or address 0 or NULL points to nothing 2003 Prentice Hall Inc. All rights .

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.