BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Scrum
  2. Apache Maven 2
  3. Essential MySQL
  4. Node.js
  5. Groovy
  1. jQuery Selectors
  2. Ajax
  3. Java
  4. Spring Config.
  5. Java Concurrency

Link Details

Link 75093 thumbnail
User 282226 avatar

By ashishmohta
via technospot.net
Published: Apr 10 2008 / 12:22

The mistake I made was I wrote the index_number[name of array] ( Wrote 3[i] instead of i[3] ) and it gave the same result as it should have given, if I had written it correctly - A bug in C
  • 5
  • 6
  • 2244
  • 0

Comments

Add your comment
User 111696 avatar

bloid replied ago:

1 votes Vote down Vote up Reply

From: http://en.wikipedia.org/wiki/C_%28programming_language%29#Arrays


x[i] = 1;
*(x + i) = 1;
*(i + x) = 1;
i[x] = 1; /* strange, but correct: i[x] is equivalent to *(i + x) */

User 236137 avatar

dzonelurker replied ago:

1 votes Vote down Vote up Reply

All C programmers should read Kernighan and Ritchie. At least it would prevent them form writing embarrassing blog postings.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.