Market indices staged a recovery in late trades to snap two-day losing streak aided by rebound in IT majors and select index heavyweights. The Sensex ended up 41 points at 27,788 and the Nifty50 ended up 20 points at 8,529. In the broader markets, BSE Midcap ended up 0.3% while the Smallcap index ended. Market breadth ended positively with 1217 gainers and 976 losers on the BSE. IT majors TCS and Infosys which faced selling pressure in the previous sessions post their first quarter earnings recovered on renewed buying interest at lower levels. TCS ended up 1.2% while Infosys edged 0.6% higher.