26.09.2023 Views

The C Programming Language - Pointers

This is a free tutorial about pointers from the book "The C Programming Language" by Heimo Gaicher

This is a free tutorial about pointers from the book "The C Programming Language" by Heimo Gaicher

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

Introduction ____________________________________________________ 5<br />

Representation of Code, Variable- and Function Names _________________ 5<br />

1 <strong>Pointers</strong> ____________________________________________________ 6<br />

1.1 Definition of a Pointer _________________________________________ 7<br />

1.2 Examples with <strong>Pointers</strong> ________________________________________ 7<br />

1.3 Address Assignment of <strong>Pointers</strong> ________________________________ 11<br />

1.3.1 Direct Address Assignment __________________________________________ 12<br />

1.4 Pointer of <strong>Pointers</strong> ___________________________________________ 14<br />

1.5 Pointer Arithmetic ___________________________________________ 15<br />

1.6 Pointer to Arrays ____________________________________________ 16<br />

1.7 Array of <strong>Pointers</strong> ____________________________________________ 17<br />

1.8 <strong>Programming</strong> Example Chessboard _____________________________ 18<br />

1.9 Passing <strong>Pointers</strong> to Functions __________________________________ 19<br />

1.10 Passing Arrays to Functions ____________________________________ 21<br />

1.11 Return a Pointer from Functions ________________________________ 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!