πŸ“Š C++
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
181
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
98%
Success Rate