Would all 10 mega pixel camera have the same picture quality?

The resolution should be the same. The picture quality is also determined by how well the camera copes with light and other factors such as being able to replicate true colours, so there is variation. Some will be better than others.