For purposes of determining whether a person pays out-of-state or in-state tuition for attendance at universities and community and junior colleges, the residence of a person less than twenty-one (21) years of age is that of the father, the mother or a general guardian duly appointed by a proper court in Mississippi. If a court has granted custody of the minor to one (1) parent, the residence of the minor is that of the parent who was granted custody by the court. If both parents are dead, the residence of the minor is that of the last surviving parent at the time of that parent’s death, unless the minor lives with a general guardian duly appointed by a proper court of Mississippi, in which case his residence becomes that of the guardian. A student residing within the State of Mississippi who, upon registration at a Mississippi institution of higher learning or community college, presents a transcript demonstrating graduation from a Mississippi secondary school and who has been a secondary school student in Mississippi for not less than the final four (4) years of secondary school attendance shall not be required to pay out-of-state tuition. This section shall not apply to the residence of a person as it relates to residency for voter registration or voting.