I dont know why this not outputting the whole string

#include <string.h>
#include
using namespace std;
// IAmACompetitiveProgrammer I Am A Competitive Programmer
// 0123456789 0123456789
int main()
{
char a[1000];
cin.getline(a, 1000);
int l = strlen(a);
char op[1000];
op[0] = a[0];
int j = 1;
for (int i = 1; i < l; i++)
{
int ascii = int(a[i]);
if (ascii >= 65 && ascii <= 90)
{
op[j] = ‘\n’;
}

    j=j+1;
    op[j] = a[i];

}
op[j + 1] = '\0';

for (int i = 0; op[i] != '\0'; i++)
{
    cout << op[i];
}

return 0;

}

pls try the output using the code given by me and do tell me where am I committing the mistake since I am not getting the whole string printed dont provide me the direct soln,do check the code

hi @rounaqkhandelwal24
Kindly save ur code on coding Blocks ide and send link…

@rounaqkhandelwal24
if u still face any difficulty, u can refer my code -->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.