#include &lt;iostream&gt;    using namespace std;    class base    &#123;        int val1, val2;        public:        int get&#40;&#41;	&#123;            val1 = 100;            val2 = 300;	&#125;        friend float mean&#40;base ob&#41;;    &#125;;    float mean&#40;base ob&#41;    &#123;        return float&#40;ob.val1 + ob.val2&#41; / 2;    &#125;    int main&#40;&#41;    &#123;        base obj;        obj.get&#40;&#41;;        cout &lt;&lt; mean&#40;obj&#41;;        return 0;    &#125;
A. 200
B. 150
C. 100
D. 300
Answer:A
#include &lt;iostream&gt;    using namespace std;    class base    &#123;        int val1, val2;        public:        int get&#40;&#41;	&#123;            val1 = 100;            val2 = 300;	&#125;        friend float mean&#40;base ob&#41;;    &#125;;    float mean&#40;base ob&#41;    &#123;        return float&#40;ob.val1 + ob.val2&#41; / 2;    &#125;    int main&#40;&#41;    &#123;        base obj;        obj.get&#40;&#41;;        cout &lt;&lt; mean&#40;obj&#41;;        return 0;    &#125;
A. 200 B. 150 C. 100 D. 300
Explanation:In this program, We are finding the mean value by declaring the function mean as a friend of class base.