TCS reports better than expected earnings; inflation accelerates in June; markets end Thursday in the green