Pregunta de entrevista de Qualcomm

Write a function to check if a bit is set in a specific position.