UGC NET CS 2009 Dec-Paper-2
November 12, 2023OOPS
November 12, 2023OOPS
|
Question 4
|
Which among the following is the correct way of declaring object of a class
|
Classname objectname;
|
|
|
Class classname obj objectname;
|
|
|
Class classname obj objectname;
|
|
|
Classname obj objectname
|
Question 4 Explanation:
The correct way of declaring object of a class is
Classname objectname;
For example ,let there be some class of name Area. So we can declare object of Area class like,
Area A1;
Classname objectname;
For example ,let there be some class of name Area. So we can declare object of Area class like,
Area A1;
Correct Answer: A
Question 4 Explanation:
The correct way of declaring object of a class is
Classname objectname;
For example ,let there be some class of name Area. So we can declare object of Area class like,
Area A1;
Classname objectname;
For example ,let there be some class of name Area. So we can declare object of Area class like,
Area A1;
