πŸ“Š C++
Q. What is the output of this program?
Code:
#include 
    using namespace std;
    void square (int *p)
    {
	*p = (*p + 1) * (*p);
    }
    int main ( )
    {
	int n = 11;
        square(&n);
        cout << n; 
        return 0;
    }
  • (A) 11
  • (B) 123
  • (C) 321
  • (D) 132
πŸ’¬ Discuss
βœ… Correct Answer: (D) 132

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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