Print out symmetric matrix from compactly stored array
I think it the following is a good approach:
//use lowercase on non constant values
void print_symmetric_packed_matrix(double* compact_matrix, int n)
{
    const int entries = N*N;
    for (int i = 0; i &lt; entries;)
    {
        //i++ here avoids i != 0 each iteration
        printf(&quot;%f &quot;, compact_matrix[i++]);
        if (i % N == 0) printf(&quot;\n&quot;);
    }
}

I hope it helped you.