Function call with array index
<p>I came across with a statement with function call and as well as array index in the kind of code mentioned below .In this the statement s=o.init()[-1] is returning value of a1[0].
I am not cleared with the concept of how it is working, what this statement o.init()[-1] will do ?, i know 0.init() will give a call to function but what does [-1] specify?
Pls help to solve this query?   </p>

<pre><code>#include&lt;iostream&gt;
using namespace std;

class a
{
  char a1[1000];

  public:
  a()
 {
    a1[0]='a';
 }
  char* init()
  {
     cout&lt;&lt;"value of a1 is"&lt;&lt;a1&lt;&lt;endl;
     return a1+1;
  }
};

int main()
{
   a o;
  char s;
  s=o.init()[-1];


cout&lt;&lt;"value of s  is"&lt;&lt;s&lt;&lt;endl;
}
</code></pre>
