When to use nan and nani?
==> The Japanese question word for “what” has two pronunciations: nan and nani. nan is used immediately before desu or before a “counter” like ji (o’clock). The other form, nani, is used before particle. Nani is also used in the combination nanjin (person of what nationality).

For ex. senko wa nan desu ka ==> what is your major?