I have written code to reverse string. I am stuck with my logic. I know string is null terminated in c language so array hold total 6 character including NULL terminator

Code:
#include <stdio.h>

int main()
{
    int i = 0;
    char array[6]= {"NEERG"};
	char temp = array[0];
	              
    for ( int i = 0; i < 5; i++)
    {
        for (int  j = 6; j >= 0; j--)
        {
                temp =  array[i];
                array[i] = array[j];
                array[j] = temp;        
        }           
    }
   
    printf("%s", array);
   
    return 0;
}
Program output
Code:
REEN
all the letters are getting reverse but G is missing in string

How to reverse all letters