Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Dynamic memory project

Objective

In this project, our main goal is to understand how to create and delete pointers using dynamic memory allocation operators.

Problem

Create a pointer of type double and perform the following operations on it.

Implementation

  1. Declare a pointer of type double using the (new) dynamic memory operator.
  2. Assign a value to the pointer.
  3. Print the pointer value.
  4. Delete the pointer value using the (delete) dynamic memory operator.


#include <iostream>

using namespace std;

int main(){

    /*
    Add your code here
    1. declare a double pointer using the (new) dynamic memory operator
    */

    /*
    Add your code here
    2. Assign a value to the double pointer;
    */

    /*
    Add your code here
    3. print the pointer value
    */


    /*
    Add your code here
    4. delete the pointer value using the (delete) dynamic memory operator
    */    

    return 0;
};

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages