Pregunta de entrevista de Tata Consultancy Services

Algorithm for randomly choosing a value in C language