Hi! could please tell me how can I get the diffetent characters of a certain array. for example in the array L = "nnbaaa"; and need to get from L the characters n, a and b and store in another array K = "nab", because n,a, and b are the diffetent chacters in L. thank you for your help.
Hi Banfa! Yes I understood what you said. so I have to get each character in the input and then make a loop to see if this character is already in result. but the problem is that I don't know the lenght of resul. so how can I make the loop. thanks for your help
u can make a loop until u get the new line character('\n')
char str;
while(str!='\n')
{
//logic u write here
}
Hi Banfa! Yes I understood what you said. so I have to get each character in the input and then make a loop to see if this character is already in result. but the problem is that I don't know the lenght of resul. so how can I make the loop. thanks for your help
Thank you very much for your help. could you please tell me how can I get the number of different character if L. for example L = "nnbaaa", So the number of different characters is 3, because of n, b and a. how can I get this number in a efficient way. thank you