C Arrays - University of Delaware
1
6
C Arrays
? 2007 Pearson Education, Inc. All rights reserved.
2
6.1 Introduction
Arrays
¨C Structures of related data items
¨C Static entity ¨C same size throughout program
? 2007 Pearson Education, Inc. All rights reserved.
3
6.2 Arrays
Array
¨C Group of consecutive memory locations
¨C Same name and type
To refer to an element, specify
¨C Array name
¨C Position number
Format:
arrayname[ position number ]
¨C First element at position 0
¨C n element array named c:
- c[ 0 ], c[ 1 ]...c[ n ¨C 1 ]
? 2007 Pearson Education, Inc. All rights reserved.
4
Fig. 6.1 | 12-element array.
? 2007 Pearson Education, Inc. All rights reserved.
5
6.2 Arrays
Array elements are like normal variables
c[ 0 ] =
3;
printf( "%d", c[ 0 ] );
¨C Perform operations in subscript. If x equals 3
c[ 5 - 2 ] == c[ 3 ] == c[ x ]
? 2007 Pearson Education, Inc. All rights reserved.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- bny mellon trust of delaware verify check
- bny mellon trust of delaware phone number
- state of delaware professional regulations
- state of delaware professional license lookup
- state of delaware license verification
- state of delaware certificate incorporation
- state of delaware professional regulation
- alzheimer s association of delaware valley
- c arrays examples with loops
- state of delaware division of corporations
- state of delaware property search
- state of delaware online division of corporations