×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which of the following is a valid way to allocate dynamic memory for an integer variable?

162 . Which of the following is a valid way to allocate dynamic memory for an integer variable?

  1. int *ptr = new int(111);
  2. int *ptr = NULL;ptr = new int; *ptr=111;
  3. int *ptr;ptr = new int; *ptr=111;
  4. All the above

Answer: D) All the above

Explanation:

All the given options are valid to allocate dynamic memory for an integer variable.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.