adplus-dvertising
frame-decoration

Question

Consider the code and select the wrong choice:
class hero
{ 
 char name[10];
 public : void disp()
 { 
  cout<<name;
 }
};

a.

This maintains encapsulation

b.

This code doesn’t maintain encapsulation

c.

This code is vulnerable

d.

This code gives error

Answer: (a).This maintains encapsulation

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the code and select the wrong choice: