#include &lt;iostream&gt;    using namespace std;    class vec    &#123;        public:        vec&#40;float f1, float f2&#41;         &#123;            x = f1;            y = f2;        &#125;        vec&#40;&#41;        &#123;        &#125;        float x;        float y;    &#125;;    vec addvectors&#40;vec v1, vec v2&#41;;    int main&#40;&#41;     &#123;        vec v1&#40;3, 6&#41;;        vec v2&#40;2, -2&#41;;        vec v3 = addvectors&#40;v1, v2&#41;;        cout &lt;&lt; v3.x &lt;&lt; &quot;, &quot; &lt;&lt; v3.y &lt;&lt; endl;    &#125;    vec addvectors&#40;vec v1, vec v2&#41;    &#123;        vec result;        result.x = v1.x + v2.x;        result.y = v1.y + v2.y;        return result;    &#125;;
A. 4, 5
B. 4, 4
C. 5, 4
D. 5, 5
Answer:A
#include &lt;iostream&gt;    using namespace std;    class vec    &#123;        public:        vec&#40;float f1, float f2&#41;         &#123;            x = f1;            y = f2;        &#125;        vec&#40;&#41;        &#123;        &#125;        float x;        float y;    &#125;;    vec addvectors&#40;vec v1, vec v2&#41;;    int main&#40;&#41;     &#123;        vec v1&#40;3, 6&#41;;        vec v2&#40;2, -2&#41;;        vec v3 = addvectors&#40;v1, v2&#41;;        cout &lt;&lt; v3.x &lt;&lt; &quot;, &quot; &lt;&lt; v3.y &lt;&lt; endl;    &#125;    vec addvectors&#40;vec v1, vec v2&#41;    &#123;        vec result;        result.x = v1.x + v2.x;        result.y = v1.y + v2.y;        return result;    &#125;;
A. 4, 5 B. 4, 4 C. 5, 4 D. 5, 5
Explanation:In this program, We are adding two vectors by using standalone function and printing it.