Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » Homework HelpRSS Feeds

Program that provides an example of dynamic memory allocation

Posted By: Ramond Fischer     Category: C++ Programming     Views: 6952

Write a program that provides an example of dynamic memory allocation.

Code for Program that provides an example of dynamic memory allocation in C++ Programming

#include<iostream.h>
#include<conio.h>
main()
{
    clrscr();
    int *p=newint(5);
    cout<<"p= "<<*p<<"\n";
    delete p;
}
  
Share: 



Ramond Fischer
Ramond Fischer author of Program that provides an example of dynamic memory allocation is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!