Cameron was unable to provide the English translation of Magna Carta (Great Charter) or name the composer of "Rule Britannia" (Thomas Arne).
Cameron's appearance on the "Late Show" overshadowed his earlier speech to the U.N. General Assembly, at least in the British media Thursday.
He was judged by critics to have been a bit wooden and not terribly funny, but was not seen to have embarrassed himself during the appearance. His fellow guests were also British - actor Jonny Lee Miller and band Mumford & Sons.
The prime minister was able to name the year the Magna Carta - the legal charter that provided the basis for Britain's constitutional law - was drawn up (1215) and to describe its role in the development of democracy.
And he got a laugh from the studio audience when he described Britain's historic relations with the U.S.
"There were some good bits and some less than good bits, and obviously we had a bit of a falling out," he said. "I like to think we've got over that now."
But the gaps in his knowledge provided an opening for Cameron's political opponents.
"Great to see a witty and intelligent Brit do so well to promote his country on Letterman last night," tweeted former Deputy Prime Minister John Prescott. "Well done Jonny Lee Miller! "