Q:

Consider the code and select the wrong choice:

0

Consider the code and select the wrong choice:

 

class hero
{ 
 char name[10];
 public : void disp()
 { 
  cout<<name;
 }
};

  1. This maintains encapsulation
  2. This code doesn’t maintain encapsulation
  3. This code is vulnerable
  4. This code gives error

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (a).This maintains encapsulation

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

OBJECT ORIENTED PROGRAMMING OOPS CONCEPT AND FEATURES MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Encapsulation is the way to add functions in a use... >>
<< Consider the following code and select the correct...