If str [ i ] is between A and Z and i is the last occurence in str
else if ( ( str [ i ] >= ' A ' && [ ] <= ' Z ' ) && [ [ i ] - 65 ] == i ) { int occ = str [ i ] - 64 ; while ( occ -- > 0 ) { res = res + str [ i ] ; } }