math.answers.com/math-and-arithmetic/C_allows_an_array_index_of_both_positive_and_negative_integer

Preview meta tags from the math.answers.com website.

Linked Hostnames

8

Thumbnail

Search Engine Appearance

Google

https://math.answers.com/math-and-arithmetic/C_allows_an_array_index_of_both_positive_and_negative_integer

C allows an array index of both positive and negative integer? - Answers

Yes, see the C99 ISO standard §6.5.2.1/2. Assuming a pointer "a" into an allocated array, a[-1] is equivalent to *(a - 1). Naturally, if (a - 1) points to an unallocated memory location, you get undefined behavior.



Bing

C allows an array index of both positive and negative integer? - Answers

https://math.answers.com/math-and-arithmetic/C_allows_an_array_index_of_both_positive_and_negative_integer

Yes, see the C99 ISO standard §6.5.2.1/2. Assuming a pointer "a" into an allocated array, a[-1] is equivalent to *(a - 1). Naturally, if (a - 1) points to an unallocated memory location, you get undefined behavior.



DuckDuckGo

https://math.answers.com/math-and-arithmetic/C_allows_an_array_index_of_both_positive_and_negative_integer

C allows an array index of both positive and negative integer? - Answers

Yes, see the C99 ISO standard §6.5.2.1/2. Assuming a pointer "a" into an allocated array, a[-1] is equivalent to *(a - 1). Naturally, if (a - 1) points to an unallocated memory location, you get undefined behavior.

  • General Meta Tags

    22
    • title
      C allows an array index of both positive and negative integer? - Answers
    • charset
      utf-8
    • Content-Type
      text/html; charset=utf-8
    • viewport
      minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no
    • X-UA-Compatible
      IE=edge,chrome=1
  • Open Graph Meta Tags

    7
    • og:image
      https://st.answers.com/html_test_assets/Answers_Blue.jpeg
    • og:image:width
      900
    • og:image:height
      900
    • og:site_name
      Answers
    • og:description
      Yes, see the C99 ISO standard §6.5.2.1/2. Assuming a pointer "a" into an allocated array, a[-1] is equivalent to *(a - 1). Naturally, if (a - 1) points to an unallocated memory location, you get undefined behavior.
  • Twitter Meta Tags

    1
    • twitter:card
      summary_large_image
  • Link Tags

    16
    • alternate
      https://www.answers.com/feed.rss
    • apple-touch-icon
      /icons/180x180.png
    • canonical
      https://math.answers.com/math-and-arithmetic/C_allows_an_array_index_of_both_positive_and_negative_integer
    • icon
      /favicon.svg
    • icon
      /icons/16x16.png

Links

58