Shares of TCS moved up by 2.86 per cent to settle at Rs 1,264.60 on the BSE, while Infosys gained 1.9 per cent to close at Rs 2,255.70.
Among others, Wipro was up by 0.83 per cent, HCL Tech gained 1.46 per cent, Oracle Financial Services rose 0.75 per cent, Tech Mahindra moved up by 0.67 per cent and the stock of Hexaware Technologies closed 0.44 per cent up.
Following the gains in these stocks, the BSE IT index settled 1.95 per cent up at 5,449.97.
"Shares of IT companies performed well today on the back of strong set of numbers posted by Cognizant for the June quarter," Milan Bavishi Head Research Inventure Growth & Securities said.
Cognizant has pipped Infosys Technologies to become the second-largest software company in India with a revenue of $ 1.79 billion (about Rs 9,938 crore) for the April-June quarter this year.
For the September quarter, Cognizant anticipates its revenues to be at least $ 1.875 billion, while for the 2012, it maintained outlook for revenue to be at least $ 7.34 billion (at least 20 per cent growth compared to 2011).
With a bullish annual revenue outlook, Cognizant may remain at the number two spot as Infosys has given a muted guidance of 5 per cent growth for the year, given the uncertainty in the global environment. Infosys expects revenues to be $ 7.343 billion in FY13.
Though Cognizant is not listed in India, 75 per cent of its over 1.45 lakh employees are based in India and is often referred to as an Indian entity.