Typhoid is a bacterial infection caused by Salmonella typhi that is transmitted through contaminated food or…