Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do this thank you > Question 4 1 pts Let ptr be a pointer to Circle objects. How can you set it to null?

please do this thank you

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

> Question 4 1 pts Let ptr be a pointer to Circle objects. How can you set it to null? O ptr = NULL; O ptr = null; O ptr = nullptr: Question 5 1 pts Let ptr be a pointer to Circle objects. How can you allocate memory for a Circle object at runtime, and make ptr point to it. O ptr = new Circle ptr = alloc(Circle): O ptr - Circle(): D Question 6 1 pts Let ptr be a pointer to Circle objects. How can you call getRadius() method of the object that ptr point to? ptr ->getRadius(); ptr.getRadius: Question 7 How can you deallocate memory for a Circle object that ptr points to? Ofree ptr: O ptr = nullptr: delete ptr; Question 8 1 pts Match with the residing memory region. Local variable in a function [Choose] Object created at runtime using new operator [ Choose Global variable [Choose Function parameters [Choose Program in binary format Choose 1 pts Question 8 Match with the residing memory region. Local variable in a function Object created at runtime using new operator [Choose! Choose ] Stack Static memory Heap Code segment Choose Global variable Function parameters Choose Program in binary format [Choose

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions