Microsoft interview question

First Technical Interview: Implement strtok function, and expand by asking some thing connect to multithreading. Second Technical Interview: Data Structure of Cache's (vector of Caches) and each cache divided for segments, and give me API to use that accept one segment and revalidate it. after the implemantation ask to much question about Threads(mutex for each cache/ mutex for each segment ) and using timestamp.... Third Interview: 1) Describe a game, a matrix(nXn) with 0,1 values and in each iteration in the game accept number 0/1 and put it in down left cell and the other cells rotates.(up righ cell get out of the matrix). ask me to implement data structure for the game. (Solution: using queues for each row, and you have to arrive for a trick about the columns). 2) give me file interface with read function in each call return one row from the file, and must implement: a- function prints first N rows. b- function prints last N rows.