Why here in the for loop the initialization is not done and the loop is working fine .in which case can it be done?

int partition(int *a,int s,int e){

int i=s-1;
int j = s;
int pivot = a[e];
for( ;j<e;j++){
    if(a[j]<=pivot){
        i++;
        swap(a[i],a[j]);
    }
}
///Bring the pivot element to its sorted position
swap(a[i+1],a[e]);
return i+1;

}

hi @Agam_virgo j was initialised outside the for loop, you can write the same thing as

for(int j = s ;j<e;j++){

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.