πŸ“Š C++
Q. What is the output of this program?
Code:
#include 
    using namespace std;
    void function(int p, bool condition = true)
    {
        if (condition == true ) 
        {
            cout << "Condition is true. P = " << p;
        }
        else 
        {
            cout << "Condition is false. P = " << p;
        }
    }
    int main()
    {
        function(250, false);
        return 0;
    }
  • (A) Condition is true. P = 250
  • (B) 200
  • (C) Condition is false. P = 250
  • (D) True
πŸ’¬ Discuss
βœ… Correct Answer: (C) Condition is false. P = 250

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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