What will happen when li=0 and lj=0

for(int li=0 ; li < n ; li++ )

    for(int lj=0;lj<n;lj++)
        for(int bi=li;bi<n;bi++)
            for(int bj=lj;bj<n;bj++)
            {
                sum+=pre[bi][bj]-pre[li-1][bj]-pre[bi][lj-1]+pre[li-1][lj-1];
            }

the index pre [ li-1 ] [ bj ] and pre [ bi ] [ lj-1 ] will not exist as li=0 and lj=0;
and we know pre [ -1 ] [ bj ] and pre [ bj ] [ -1 ] does not exist.
and even I tried to run the same program and the output comes out to be wrong.