Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 7. Arrays (ARR)

Chapter 7. Arrays (ARR)

Recommendations and Rules
RecommendationPage
ARR00-C. Understand how arrays work242
ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array245
ARR02-C. Explicitly specify array bounds, even if implicitly defined by an initializer248
RulePage
ARR30-C. Guarantee that array indices are within the valid range250
ARR31-C. Use consistent array notation across all source files251
ARR32-C. Ensure size arguments for variable length arrays are in a valid range254
ARR33-C. Guarantee that copies are made into storage of sufficient size255
ARR34-C. Ensure that array types in expressions are compatible258
ARR35-C. Do not allow loops to iterate beyond the end of an array259
ARR36-C. Do not subtract or compare two pointers that do not refer to the same array261
ARR37-C. Do not add or subtract an integer to a pointer to a non-array object263
ARR38-C. Do not add or subtract an integer to a pointer if the resulting value does not refer to a valid array element265



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial