What is the function of the cell membrane?

To add structure and support to the shape of the cell
To control what substances enter and leave the cell
To monitor the amount of glucose needed by the cell
To prevent waste from entering and leaving the cell