which of the following cannot be the graph of a function of X?

Why not? Because it fails the vertical line test. Here it is possible to draw a single straight vertical line through more than one point on the curve. That's why choice D is not a function. Choices A,B,C are functions because it's impossible to draw a single vertical line through more than two points on the curve, and therefore we can say they pass the vertical line test.
Side note: choices B and C fail the horizontal line test, so these functions are not one-to-one.