R

Ram Sharma • 193.86K Points
Coach

Q. Which of the following is/are valid ways to allocate memory for an integer by dynamic memory allocation in CPP?

  • (A) int *p = new int(100);
  • (B) int *p; p = new int; *p = 100;
  • (C) int *p = NULL; p = new int; *p=100;
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 120
  • Filed under category C++

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics