InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is wrong syntax related to static data members?(a) className :: staticDataMember;(b) dataType className :: memberName =value;(c) static dataType memberName;(d) className : dataType -> memberName; |
|
Answer» Correct answer is (d) className : dataType -> memberName; Explanation: The syntax given in option d doesn’t belong to any particular declaration or definition. First one is to access the static members using the class name. Second is to define the static data outside the class. Third syntax id to declare a data member as static in a class. |
|