Size and weight are big decision factors when you are trying to find the ideal camera for your needs.
In this section, we are going to illustrate the Pentax K-x and Nikon S4000 side-by-side from the front, back and top in their relative dimensions. Pentax K-x has external dimensions of 123 x 92 x 68 mm (4.84 x 3.62 x 2.68″) and weighs 580 g (1.28 lb / 20.46 oz) (including batteries). Nikon S4000 has external dimensions of 95 x 57 x 20 mm (3.74 x 2.24 x 0.79″) and weighs 131 g (0.29 lb / 4.62 oz) (including batteries).
Below you can see the front-view size comparison of the Pentax K-x and the Nikon S4000. Nikon S4000 is clearly the smaller of the two cameras. Its body is 28mm narrower, 35mm shorter and 48mm thinner than Pentax K-x. As you can tell, actually this is not a fair size comparison since Nikon S4000 has a built-in lens but Pentax K-x doesn't. Once you put a lens on K-x, its thickness will increase significantly.
Here is the back view size comparison of the Pentax K-x and Nikon S4000.
Weight is another important factor, especially when deciding on a camera that you want to carry with you all day.
Nikon S4000 is significantly lighter (449g ) than the Pentax K-x which may become a big advantage especially on long walking trips.
Again, this comparison may not be very useful in real life as we are comparing the weight of a camera with a built-in lens to the body-only weight of an interchangeable lens camera. Once you put a lens on K-x, the total kit will weigh much higher.
Weather Sealing
Unfortunately neither the Pentax K-x nor Nikon Coolpix S4000 provides any type of weather sealing in their bodies, so you have to give extra care especially when you are shooting outdoors. If weather sealing is a must-have feature for you, check these sections: Top DSLR Cameras with Weather Sealing Top Compact Cameras with Weather Sealing
LCD Screen Size and Features
Nikon S4000's 3.00" LCD screen is slightly larger than Pentax K-x's 2.7 screen.
Unfortunately, both cameras has fixed screens so they don't tilt or flip in directions.