Searching first non repeating character
This is a bad habbit stop doing it.

using namespace std;


Once your programs are more than 10 lines long it starts adding complexity including the whole namespace. SO best not to do it. Get into the habit of not using now otherwise breaking the habit is hard latter.

Don't put bad comments in you code (in fact try not to put comments). A comment should explain what you are trying to achieve (or potentially why) (NOT HOW). The code explains how so don't duplicate the code in comments. The worst thing to find in code is comments that don't match the code.

char a2z[26]={0};//Hash


This is not a hash. A hash has a very specific meaning and this is not what you are doing.

Prefer to use [] when declaring the array. This means the compiler will try and establish the length of the array for you.

char input[100] = "abcbbbcdegh";//sample input, only small case english alphabets


While we are here. Stop using C stuff in C++. Learn to use C++ constructs and don't mix the languages up. Another bad habbit you should fall into.

int n = strlen(input);


C++ has its own string class.

std::string  input("abcbbbddddd");
// size is input.size()


Learn how to use iterators.

for(int i=0; i&lt;n; ++i)


It will allow you to be more versatile with your code. Potentially allowing your code to work with multiple container types (not just string). But more importantly it is the first step to using the standard algorithms.

You are making the assumption that your input only contains lower case letters. You should always code defensively. You MUST validate your input.