Exact locations of conductive filaments formed in NiO-based resistive switching (RS) cells were detected by C-AFM, and their electrical as well as chemical properties were investigated. After a forming process, a part of top electrodes of Pt/NiO/Pt RS cells is deformed. NiO layers are also deformed, and conductive spots, i.e. filaments have been found preferentially along the edges of deformations. Detailed C-AFM investigation has revealed that variation of cell resistances originates from differences in size and shape of filaments, not their resistivity. Furthermore, cross-sectional TEM analysis has demonstrated that filaments determining cell resistance consist of reduced NiO with an inclusion of Pt.