Sensex and Nifty climb on Wednesday with HDFC Bank and IT stocks leading gains, fueled by foreign fund inflows.