πŸ“Š C++
Q. What is the output of this program?
Code:
#include 
    using namespace std;
    void copy (int& p, int& q, int& r)
    {
        p = p * 1;
        q = q * 2;
        r = r * 3;
    }
    int main ()
    {
        int m = 6, n = 3, o = 2;
        copy (m, n, o);
        cout << "M = " << m << ", N = " << n << ", O = " << o;
        return 0;
    }
  • (A) M = 6, N = 6, O = 6
  • (B) N = 6, O = 6, M = 6
  • (C) O = 6, M = 6
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) M = 6, N = 6, O = 6

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
263
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Uday Singh
Publisher
πŸ“ˆ
96%
Success Rate