Sensex, Nifty extend gains for second day on foreign fund inflows, rally in US market