Here I have provided a cpp code as a solution for Readers-Writets starvation and moreover a documentation file containing pseudocode(Starve-Free.md) specifying the same.
g++ Starve-Free.c -pthread -o cpp_output -std=c++11 && ./cpp_output && rm cpp_output