Mobicip interview question

Given string abc, write algo to find substrings : a,ab,b,ac,.........abc