Benchmark indices Sensex and Nifty ended largely flat on Wednesday, with the 30-share Sensex snapping its three-day gaining streak, while Nifty managed to close marginally higher.