Who funded the construction of Islamic mosques and libraries in the mideavel era?

A. architects
B. philosophers
C. Muslim scholars and merchants
D. wealthy citizens and rulers​