#include <iostream>
#include <cstring>
#include <limits>

int main()
{
    constexpr char cstr[] = "introduction";

    // initialize an array to hold the count of occurrances
    int counts[ std::numeric_limits<unsigned char>::max() ] = {0} ;

    // populate the counts
    for( unsigned char u : cstr ) ++counts[u] ;

    // find the first char for which count is equal to 1
    for( unsigned char u : cstr ) if( counts[u] == 1 && u != 0 )
    {
        std::cout << "first non-repeating char is '" << char(u) << "'\n" ;
        break ;
    }
}
