Regarding Arrays and retrieval of Info

If you have say Char Array[100] and fill this with a simple binary alphabet ie (H,P)

Whats the best way to create another function which can call whats inside the array and then change each element so that H=1 and P=0, so i can then print this out?

Any help is appreciated