Answer:
This is from The Hitchhiker's Guide to the Galaxy (UK radio series, novel 1979)
It is never absolutely established, but it may have been
"What do you get if you multiply six by nine?"
....
In The Hitchhikers Guide to the Galaxy trilogy, Deepthought is the ultimate computer which is programmed to deliver the answer to the ultimate question. The answer is 42. But no one recorded the question. A new computer must now be built to discover what the question is - but this computer is damaged during its construction (so that its answer may not be reliable), and then just before it is due to produce a result, it is destroyed due to some clerical mismanagement. Douglas Adam's novel is a satire of the pointlessness of modern society (it was written during the Thatcher years in Britain). The point of the novel is that there may not be an answer, and if there was - who would care?
42 has quite an interesting history as the ultimate answer. In Alice in Wonderland the King tells Alice that Rule 42 is 'the oldest rule in the book'.
When the question is believed discovered in a sequel, it is "What do you get if you multiply six by nine?" To which protagonist Arthur Dent replies: "Six by nine? Forty-two? That's it? That's all there is? I always thought there was something fundamentally wrong with the universe."
(see questions and answers in discussion)
Answer (not from Hitchhiker's Guide):
There are only three questions which one should be concerned with and none have anything to do with 42. Where did I come from, Why am I here, and Where will I go when I die?