title: How to Initialize array in c?
body: <p>I have written this code but on compilation i'm getting message "invalid expression"
  for the following statement</p>
  
  <pre><code>unsigned short address[] ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/*array is being   initialized here.no problem uptil here.*/
  unsigned short rowHead=3;
  unsigned short colHead=0;
  unsigned short rowTail =0;
  unsigned short colTail =0;
  unsigned short foodx;
  unsigned short foody;
  unsigned short turn=0;
  void gameOver()
  {
  unsigned short i=0;
  address[] ={0b10000001,0b01000010,0b00100100,0b00011000,
              0b00011000,0b00100100,0b01000010,0b10000001};
  /*this is the line where compiler complaints as invalid expression.*/
  while(1)
      {
      PORTD &amp;=~(1&lt;&lt;i);
      PORTB =address[i];
      delay_ms(5);
      PORTD |=1&lt;&lt;i;
      i%8;
      }
  }
  </code></pre>