Below you can see the front-view size comparison of the Canon S120 and Nikon P340. The Canon S120 is 3 mm narrower and 3 mm thinner than the Nikon P340 but it is also 1 mm taller.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.