If the post of president and vice president fall vacant then chief justice of India will act as the president of India as prescribed in the constitution of India. If chief justice is also not present then senior most judge of supreme court will act as president. This Precedence has happened only once in Indian Political timeline when Md. Hidayatullah (then CJI) became President after death of Zakir hussain and subsequent resignation of VV Giri in 1969.