Computer Programming MCQ Questions with Solutions
Choose the correct answer. A pseudo-code which is similar to that of c++ and self-explanatory. An accessible member function or data member for an object are accessed by the statement object name, function name or object name data member name respectively.
What can we infer from this code?
Class rocket { Private: integer height,weight public: //statement 1 function input(int a,int b) { height=a; weight=b; } } function main() { rocket rocket 1,rocket2 }
B) rocket is a class with rocket1 and rocket2 as its attributes.height and weight are objects of the class rocket.
C) rocket is a class with rocket1,rocket2,height and weight as its attributes
D) rocket is a class with rocket1, rocket2, height, weight as its objects.