// first non repating characeter
include<stdio.h>
include<string.h>
bool foward(char str[],int i,int lenght)
{
int j = i+1;
while( j != lenght)
{
if(str[i] != str[j])
{j++;}
if(str[i] == str[j]){return false;break;}
}
printf("%c ",str[j]);
if(j == lenght)
{return true;}
}
bool reverse(char str[],int i)
{
int j = i -1;
if( j < 0){return false;}
while( j != 0)
{
if( str[i] == str[j]){return false ;break;}else{j--;}
}
if(j == 0){return true;}
}
int main(void)
{
char str[] ={"acaacnaacacaclmlacacacnacac"};
int nmb_of_chars;
int i=0,j = 1;
bool condition = false;
nmb_of_chars = strlen(str);
while (i != nmb_of_chars)
{
condition = foward(str,i,nmb_of_chars);
if(condition == false)
{i++;}
else
{
condition = reverse(str,i);
if(condition == true)
{printf("-------%c-----",str[i]);break;}
else{i++;}
}
}
if(i == nmb_of_chars){printf("There is no non repeating charactears");}
getchar();
getchar();
return 0;}