We present a density functional study of the structural behavior of zinc oxide nanostructures in basic growth condition which consequently leads to the formation of few layers of hydroxylated rocksalt structure over the wurtzite ZnO structure. We demonstrate the greater stability of the few layers of hydroxylated zinc oxide polar surface in rocksalt structure as compared to wurtzite structure. This coerces the near-surface layers of the nanostructure to acquire rocksalt structure giving rise to a trilayer structure consisting of a layer of hydroxyls on ZnO surface, rocksalt near-surface layers, and wurtzite bulk(or wurtzite sub-surface). The formation of coherent interface between rocksalt and wurtzite structure forces the hydroxylated trilayer structure to have lattice constant in between that of a rocksalt and wurtzite structure. Further, the hydroxylated rocksalt structure in the trilayer configuration is stable up to a critical size of the trilayer above which the increasing strain due to lattice mismatch between rocksalt and wurtzite structure overcomes the stabilizing effect of the hydroxylated rocksalt structure.