https://muzahid-nafiz.medium.com/problem-solving-in-c-part-3-nested-loop-function-and-pointer-d6abd78f6e68