While the application is in the backround, but still visible on the screen, hold down the command key and try to manipulate any user interface element (scroll bar, popup menu, it doesn't matter). If the application stays in the background, it's Cocoa.
Also of note (though I think it's been mentioned here before) is that almost any application will allow you to move windows around with the command key held down and they will stay in the background (regardless of whether they ar Cocoa or Carbon). This has actually worked since before OS X.

