πŸ“Š C++
Q. Which of the following is true about new when compared with malloc:
1) new is an operator, malloc is a function
2) new calls constructor, malloc doesn’t
3) new returns appropriate pointer, malloc returns void * and pointer needs to typecast to appropriate type.
  • (A) 1 and 2
  • (B) 2 and 3
  • (C) 1 and 3
  • (D) 1, 2 and 3
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1, 2 and 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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