The book, ‘A Promised Land’, detailed how the two “butted heads” over their six years of contact. In the book Mr Obama described Mr Cameron, British Prime Minister between 2010 and 2016, as having “the easy confidence of someone who’d never been pressed too hard by life”.
However, the former president also said he personally liked Mr Cameron, and had cooperated with him on a number of issues.
Mr Obama wrote: “In his early forties, with a youthful appearance and a studied informality (at every international summit, the first thing he’d do was take off his jacket and loosen his tie), the Eton-educated Cameron possessed an impressive command of the issues, a facility with language, and the easy confidence of someone who’d never been pressed too hard by life.
“I liked him personally, even when we butted heads, and for the next six years he’d prove to be a willing partner on a host of international issues, from climate change (he believed in the science) to human rights (he supported marriage equality) to aid for developing countries).
“On economic policy though, Cameron hewed closely to free-market orthodoxy, having promised voters that his platform of deficit reduction and cuts to government services – along with regulatory reform and expanded trade – would usher in a new era of British competitiveness.
“Eton-educated Cameron possessed an impressive command of the issues”
Mr Obama’s memoir covers the period from his childhood until May 2011
“Instead, predictably, the British economy would fall deeper into a recession.”
The former president’s memoir, which comes to 701 pages, tells his story from childhood to the killing of Osama bin Laden in May 2011.
He is planning a second book to cover the rest of his time as president until January 2017.
Mr Obama wrote two other best-selling books, ‘Dreams from My Father’ and ‘The Audacity of Hope’ before becoming president.
Obama and Cameron pictured when they were both national leaders
He is also the author of a children’s book published in 2010.
In his memoir Mr Obama gives his opinions on a number of other world leaders.
He described German chancellor Angela Merkel as “steady, honest, intellectually rigorous and instinctually kind”.
The ex-president claimed Ms Merkel was initially sceptical of him due to his oratorical talents, but added: “I took no offence, figuring that as a German leader, an aversion to possible demagoguery was probably a healthy thing.”
Michelle Obama blasts Trump for preventing Biden’s ‘smooth transition’ [ANGER]
‘No going back’ China relations with US may NEVER be resolved [INSIGHT]
Michelle Obama fears Biden win ‘isn’t a magic wand’ amid US tensions [REVEAL]
Barack Obama and David Cameron playing table tennis
Obama pictured with Russian president Vladimir Putin
However, Mr Obama was more critical of Nicolas Sarkozy, president of France from 2007 until 2012.
Comparing Mr Sarkozy to “a figure out of a Toulouse-Lautrec painting” he claimed the Frenchman was “all emotional outbursts and overblown rhetoric”.
The former American leader added his French counterpart “never straying from his primary, barely disguised interest, which was to be at the centre of the action and take credit for whatever it was that might be worth taking credit for”.
Mr Obama also had harsh words for Russian president Vladimir Putin, describing him as “like a ward boss except with nukes and a UN Security Council veto”.
Referring to politicians who built monopolies in local city government he added: “Putin did, in fact, remind me of the sorts of men who had once run the Chicago machine or Tammany Hall.
“Tough, street-smart, unsentimental characters who knew what they knew, who never moved outside their narrow experiences, and who viewed patronage, bribery, shakedowns, fraud, and occasional violence as legitimate tools of the trade.”
Obama described Merkel as “honest, intellectually rigorous and instinctually kind”
Mr Obama was first elected president in November 2008 defeating Republican candidate John McCain.
He retained the presidency in 2012 after victory over challenger Mitt Romney.
However, the two term limit meant he was unable to run again in 2016 and Donald Trump, the Republican candidate, secured election.