Soru
has on its class data members 18)How members of an object are accessed? A. Using dot operator B. Using scope resolution operator C. Using member names directly D. Using 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 dut members from local variables in a function? 2. Data members are always public, while local variables are always private sist for the lifetime of the program, while local variables exist only during functi
Çözüm
4.5331 Voting
Filiz
Elit · 8 yıl öğretmeniUzman doğrulaması
Cevap
18) How members of an object are accessed?<br />A. Using dot operator<br /><br />19) How can Encapsulation be achieved?<br />A. Using Access Specifiers<br /><br />20) Which among the following is called first, automatically, whenever an object is created?<br />B. Constructor<br /><br />21) What is the purpose of data members in a class?<br />D. To store attributes of the class and allow controlled access<br /><br />22) What distinguishes data members from local variables in a function?<br />Data members are for the lifetime of the program, while local variables exist only during function execution.
Derecelendirmek için tıklayın: