Keysight Technologies interview question

SPI questions and C coding