Yen's K-Shortest Path algothim gives the list of K shortest paths from a source to a sink given K. There is no available C code for this algorithm. So this is a C implementation.
This is a specific requirement for working at physical layer.
Exceptions and corner cases have not been handled.
https://en.wikipedia.org/wiki/Yen%27s_algorithm
https://www.geeksforgeeks.org/printing-paths-dijkstras-shortest-path-algorithm/