Soru
17)Which among the following is false? A. Object must be created before using members of a class B. Memory for an object is allocated only after its constructor is called C. Objects can't be passed by reference D. Objects sire depends on its class data members innow members of an object are scressed? A Using dot operator B. Using scope resolution operator C. Using member names directly D. Ueing pointer only 19) How can Encapsulation be achieved? A. Using Access Specifiers B. Using only private members C. Using inheritance D. Using Abstraction 20)Which among the following is called first, automatically,whenever an object is created? A. Class B. Constructor C. New D. Trigger 21)What is the purpose of data members in a class? A. To define the behavior of the class through member functions B. To manage memory allocation for the class objects C. To represent the relationships between different classes D. To store attributes of the class and allow controlled access 22)What distinguishes data members from local variables in a function? A. Date members are always public, while local variables are always private B. Data members exist for the lifetime of the program, while local variables exist only during execution
Çözüm
4.1
(241 Oylar)
Ceyda
Elit · 8 yıl öğretmeni
Uzman doğrulaması
Cevap
17) Which among the following is false?C. Objects can't be passed by reference18) How are now members of an object accessed?A. Using dot operator19) How can Encapsulation be achieved?A. Using Access Specifiers20) Which among the following is called first, automatically, whenever an object is created?B. Constructor21) What is the purpose of data members in a class?D. To store attributes of the class and allow controlled access22) What distinguishes data members from local variables in a function?B. Data members exist for the lifetime of the program, while local variables exist only during execution