Q. What is the output of this program?

Code:
#include 
    using namespace std;
    void square (int *p)
    {
	*p = (*p + 3) * (*p);
    }
    int main ( )
    {
	int n = 15;
        square(&n);
	cout << n;
	return 0;
    }
  • (A) 207
  • (B) 270
  • (C) 15
  • (D) 3
πŸ’¬ Discuss
βœ… Correct Answer: (B) 270

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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