generate string ( str1 ) consisting char occurring once and string ( str2 ) consisting char occurring multiple times
string str1 = " " , str2 = " " ; for ( int i = 0 ; i < MAX_CHAR ; i ++ ) { if ( countChar [ i ] > 1 ) str2 = str2 + ( char ) ( i + ' a ' ) ; else if ( countChar [ i ] == 1 ) str1 = str1 + ( char ) ( i + ' a ' ) ; }