Unknown Planner Interview Question

what is the function of mosfet ?