DAVOS, Switzerland — No one was declaring President Trump a changed man. Privately, executives and global leaders who had gathered in Davos continued to worry that the American president could yet indulge his worst instincts — and his penchant for shock on Twitter — to deliver a geopolitical crisis, open up a new front in trade hostilities or offend a vast group of people.

But a rough consensus emerged over Mr. Trump’s two-day visit that his administration had shown itself to be more pragmatic than advertised. Many were inclined to view the president’s most extreme positions as just aggressive bargaining postures.

“There’s a very constructive mind-set in the Trump administration to find the best path forward,” said Vas Narasimhan, global chief of drug development for Novartis, who attended a dinner Mr. Trump hosted on Thursday night with leaders of more than a dozen European companies. “I’m optimistic that, with other world leaders, most of these issues can be tackled in a productive way for the global economy and for global businesses.”

During the dinner, Mr. Trump made the rounds, stopping to ask executives how they plan to increase investment in the United States, according to attendees.