The make and model of a camera is not really what will decide whether or not you end up with professional looking pictures. In the right hands even a lower spec camera can produce great images.
It all depends on firstly the photographers 'eye', his knowledge which allows him to acheive the image he has visualised, the quality of the glass which will give him the facility to produce quality images and finally the camera which really is just a means of controlling the exposure in conjunction with the selected lens.
All the camera bodies from the Major manufacturers produce more than acceptable images in the right hands and the D40X is amongst them. Obviously there are differences between bodies and this can often be in the form of better low light capabilities, more resolution, better build quality with weatherproofing, faster drive speeds, better Af capabilities and different sized sensors.
The D40X has a major disadvantage in that it does not have an in-body AF drive motor which restricts the number of lenses that can be used on it. Some people find this a problem, others do not.
So, to answer your question, is the D40X suitable for a beginner? I would say yes, and would it produce professional results? Again, in the right hands yes!
D40X Review here!