(b) an inmate of any public institution or any incorporated private institution, or
(c) if a child under the age of twenty-one years, in a boarding home under the care of an authorized agency, or
(d) residing on any military reservation. If, however, the periods of residence immediately prior and subsequent to the period specified in a, b, c, or d, shall together equal the required period of residence, such person shall be deemed to have had the required continuous residence.