Shares of the company, which initially rose almost 4% after results, pared some gains and were trading at $67.
"We anticipate some cautiousness in overall levels of spend in the banking sector in the second half of the year due to weakness in capital markets across banking, M&A activity with the U.S. regional banks and weak macro factors," Chief Financial Officer Karen McLoughlin said on a conference call.
Revenue from its financial services segment, which accounts for more than a third of its total revenue, rose to $1.47 billion in the latest quarter, brushing past estimates of $1.46 billion. Cognizant has seen some sluggish spending in the financial sector over the past few quarters and its reliance on the industry has been hurting its overall revenue growth.
Revenue from its second largest sector, healthcare services, fell 1.9% to $1.13 billion.
McLoughlin said the decline in healthcare was largely the result of several large clients involved in mergers.
The company competes with Accenture as well as major Indian IT companies Tata Consultancy Services, Wipro and Infosys.
The results were a relief for some investors after Cognizant posted lower first-quarter profit and cut its 2019 revenue outlook.
Wedbush analyst Moshe Katri called Wednesday's results "a relief rally post-last quarter's disaster results".
The company expects current-quarter revenue to be between $4.23 billion to $4.27 billion, above the average analyst estimate of $4.2 billion, according to IBES data from Refinitiv.
The consulting and outsourcing services provider reported net income of $509 million, or 90 cents per share, in the second quarter ended June 30, up from $456 million, or 78 cents per share, a year earlier.
Excluding items, the company earned 94 cents per share, above estimates of 92 cents.
The company reported an operating margin of 14.9%, compared with 16.7% in the year-ago quarter. It expects to slow the pace of hiring to help lower costs for the rest of the year.
Revenue rose 3.4% to $4.14 billion, in-line with analysts' average estimate of $4.14 billion, according to IBES data from Refinitiv.
(Reporting by Vibhuti Sharma in Bengaluru; Editing by Bernard Orr)