Can you read this

how to cut when encounter capital letters

@kumarakash121005 see in your character array at present u are in current char and next character ASCII value is less than 90 then u have to cut

not understandable please tell more about this

@kumarakash121005 see while u traversing ur character array if usee that your next character’s ASCII value is less than or equal to 90 then at that time u have to cut
like eg IAmAkashKumar so in this suppose u are in Am mth character and u see that ur next character 's ASCII value is less than qual to 90 then print endline

@kumarakash121005 now understood??

ok now understood but can you please tell which one is better in optimisation
#include
#include
using namespace std;

int main() {
char a[1000];
cin.getline(a,1000);
int n=strlen(a);
for(int i=0;i<n;){
if(isupper(a[i])){
cout<<a[i];
i++;
}
while(islower(a[i]) && (i<n)){
cout<<a[i];
i++;
}
cout<<endl;
}
return 0;
}

@kumarakash121005 see both are optimised but u also have a 2nd aproach in your mind in this inbuilt function also used so you have to know a aproach in which u do not use inbuilt function

@kumarakash121005 if u understood please rate

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.