Answer:
The answer to this question is "option c".
Explanation:
In this question, the correct option is option c. The variable x is an instance variable(a variable i.e defined without the static keyword and declare outside the method). This variable can't be used directly inside the main function. To access this variable we first create an object of the class then we call variable.
All the other options are not correct that can be explained as:
Option (a) is not correct because variable x is a private variable and it can be accessed only by an object that is foo(object name) inside the Foo class(class name).
Option (b) is not correct because variable x is a non-static variable and it can't be accessed in the main method. To access this variable firstly we create an object then we can access the variable.
Option (d) is not correct because variable x is permissible to create an instance of the class within the class.
So the correct answer to this question is option c.