The company took a charge of $7.5 billion in the fourth quarter related to the restructuring of its Nokia handset business, which it bought last year. Microsoft’s shares fell 4 percent to $45.38 in extended trading on Tuesday. Under Chief Executive Satya Nadella, the company has been shifting its focus to software and cloud services as demand for its once-popular Windows operating system slows.