Hewlett-Packard posted net income of $1.4 billion for its fiscal fourth-quarter, as cost cuts stemming from its ongoing restructuring more than offset the effects of sluggish computer demand.

The world’s second-largest maker of PCs, considered a bellwether in the technology industry, also issued a strong profit prediction for the current quarter.

The Palo Alto, Calif.-based company’s stock rose $1.66, or 7 percent, to $26.82 in extended trading after the results were released. The shares had dipped 16 cents to close at $25.16 in Tuesday’s regular trading session.

So far this year, HP’s stock has gained about 77 percent.

CEO Meg Whitman said better execution and cost management were driving the positive results. She said that while there is still much work to do, the quarter’s results show HP’s turnaround remains on track heading into fiscal 2014.

The personal computer industry has struggled in recent years as consumers turn their attention toward smartphones and tablet computers. HP has tried to offset declining PC demand by cutting costs and focusing on more profitable areas such as commercial and home printing.

“The enterprise PC market seems to be stabilizing and Meg’s made progress,” Jayson Noland, an analyst at Robert W. Baird & Co. who has the equivalent of a hold rating on the stock, said in an interview with Bloomberg News. “She’s picked morale up from a low point under Leo,” he said, referring to former CEO Leo Apotheker, who was ousted in 2011 in favor of Whitman.

A year ago at this time, the company disclosed an investigation into accounting fraud at its Autonomy software unit, which it had bought for $10.3 billion. Hewlett-Packard took an $8.8 billion writedown on the acquisition.

Lately the company has been optimistic about the future. Last month, the company predicted that fiscal 2014, which started in November, will be a year of “recovery and expansion.”

For the quarter ended Oct. 31, HP’s profit amounted to 73 cents per share and compared with a loss of $6.9 billion, or $3.49 per share, in the same period a year ago. Excluding one-time charges, the company earned $1.01 per share for the recent period.

Revenue fell 3 percent to $29.1 billion.

Analysts polled by FactSet expected a profit of $1 per share on $27.86 billion in revenue.

For the fiscal first quarter, the company predicts an adjusted profit of between 82 cents and 86 cents per share. HP also backed its previously issued fiscal 2014 profit prediction of $3.55 to $3.75 per share.

Analysts expect first-quarter earnings of 85 cents per share and a fiscal-year profit of $3.64 per share.

In the fourth quarter, revenue in the company’s enterprise group — which includes servers, storage and networking gear — rose 1.8 percent from a year earlier. There were a few other pockets of growth, including commercial PCs, where revenue increased 4 percent. Sales declined in most other businesses, such as consumer PCs, printers, software and enterprise services.

Corporations are spending more on technology, with companies upgrading to PCs that have Microsoft Corp.’s newer Windows operating system and away from Windows XP, said Noland.
Hewlett-Packard’s earnings report follows tepid results from enterprise computing suppliers including Cisco Systems Inc. and International Business Machines Corp. Cisco on Nov. 13 forecast its first quarterly sales decline in four years as the networking equipment maker cited slower spending by phone companies and large corporations.

IBM on Oct. 29 said it added $15 billion to its stock buyback plan after a sixth straight quarter of declining sales.

Whitman has rewarded shareholders who held on the past few years. The company said at the Oct. 9 analyst meeting that at least 50 percent of its free cash flow will be returned to shareholders via dividends and buybacks in 2014.

(The Associated Press and Bloomberg News contributed to this report).