17. What is difference between Abstract class and Interface(Abstract vs Interface)? (5 Marks) 18. Find which
Fantastic news! We've Found the answer you've been seeking!
Question:
17. What is difference between Abstract class and Interface(Abstract vs Interface)?
– (5 Marks)
18. Find which of the following uses encapsulation? - (5Marks)
a. void main(){ int a; void fun( int a=10; cout<b. class student{ int a; public: int b;};
c. class student{int a; public: void disp(){ cout<d. struct topper{ char name[10]; public : int marks; }
19. Consider the following code and select the correct option: -(5 Marks)
class student{
int marks;
public : int* fun()
{
return &marks;
}
};
main()
{
student c;
int *ptr = c.fun();
return 0;
}
a. This code is good to go
b. This code may result in undesirable conditions
c. This code will generate error
d. This code violates encapsulation
Related Book For
Posted Date: