Micron Technology Interview Question

Debug given sheet of code. Explain what is the intention of the programmer