Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I (U.S. citizen) studied abroad in France from August 2017 to May 2018, but the visa issued to me -- Type D, multi-entry -- is for the entire year (e.g. August to August).
My understanding, then, is that I can stay, even if my study program is over since my visa/residence permit doesn't expire until August 2018.