Three Layer Architecture In C