Cobalt nanowire arrays with varying length were grown by pulse electrochemical route into the pores of alumina template. The structural investigation reveals that at the bottom of the nanowire, it grows with hcp (002) structure up to few hundred nanometer in length and then changes its crystal orientation to hcp (100) phase as it further grows along the wire axis. The variation of measured coercivity and the remanent ratio as a function of nanowire length indicate that each nanowire in array grows with three different segments. The micromagnetic simulations carried out on these structures are then correlated with experimental observations.