Answer:
int switch_1,switch_2;
int get_first_switch_state()
{
return switch_1;
}
int get_second_switch_state()
{
return switch_1;
}
int get_lamp_state()
{
if((get_first_switch_state())
if(get_second_switch_state()) return 1;
else
if(!get_second_switch_state()) return 1;
return 0;
}
void toggle_first_switch()
{
if(get_first_switch_state()) switch_1=0;
else switch_1=1;
}
void toggle_second_switch()
{
if(get_second_switch_state()) switch_2=0;
else switch_2=1;
}
Explanation: