It would not be the "right answer" for Britons to vote to leave the European Union, but the British government would have to make it work if they do, Prime Minister David Cameron said today.

An opinion poll published on Thursday showed that a majority of Britons who have made up their mind would back leaving the EU in a referendum due by the end of 2017.

Mr Cameron said he hoped voters would back staying in the EU if he achieves his planned reforms to Britain's relationship with the bloc.

"The British public will make their decision. We must obey that decision whatever it is," he said.

"I don't think that (exit) is the right answer...Were that to be the answer, we would have to do everything necessary to make that work."

Asked whether the government was making contingency plans for a possible exit, Mr Cameron said it had plans for the renegotiation and referendum.

"The civil service is working to help me deliver those things. Now, if we fail to deliver them and we have to take a different stance, then that is a new situation," he said.

Arron Banks, co-founder of 'out' campaign group Leave.EU said Mr Cameron would not be taken seriously in his renegotiation if he was not prepared to walk away from the bloc.

"David Cameron's lack of a plan for withdrawal tells the EU, and voters, that he has no intention of leaving, guaranteeing that the deal he does finally produce won't be worth the paper it's written on," he said.

Mr Cameron, who travelled to Germany and Hungary last week to hold talks on his proposed reforms, said he was confident a deal could be reached on what has proved the biggest sticking point - his plans to curb welfare payments to EU migrants.

He said he believed the "massive prize" of reforming Britain's relationship with the 28-nation bloc and staying a member was closer than it had been and he was hopeful of striking a deal at a meeting of EU leaders next month.