#include<stdio.h>
#include<string.h>
void swap(char a[][50],int i,int j){
    char temp;
    strcpy(temp a[i]);
    strcpy[i],a[j];
    strcpya[j]=temp;
}
void threeway partipition(char fruits[][50],int n);
int low=0;mid=0;high=n-1;
while(mid <= high){
    if(strcmp fruitd[mid],porot);
    swap(fruits,low,mid);
    low++;
    mid++;
}elseif(strcmp(fruits[mid,porot])==0){
    mid++;
    }else{
        swap(fruits,mid,high)
        high--;
    }
    printf("number of fruits\n");
    scanf("%d",&n);
    char fruits [n][50];
    printf("enter the names of fruits:\n");
    for(int i=0;i<n;i++)
    scanf("%s",fruits[i]);
    char pirot[0];
    printf("enter the pirot fruits:"\n);
    scanf("%s",pirot);
    threeway partition(fruits,pirot);
    printf("\n fruits after 3-way partitioning:\n");
    for(int i=0;i<n;i++)
    printf("%s\n ",fruits[i]);
    return 0;
    }