#include using namespace std ; int main() { int* ptr1 ; //Allocate space for 10 integers ptr1 = (int*)malloc( sizeof(int) * 10 ) ; ptr1[0] = 100 ; ptr1[1] = 200 ; cout << ptr1[0] << ":" << ptr1[1] << endl ; cout << *ptr1 << ":" << *(ptr1+1 ) << endl ; free( ptr1 ) ; //Allocating space the C++ way for 10 integers ptr1 = new int[10] ; ptr1[0] = 101 ; ptr1[1] = 201 ; cout << ptr1[0] << ":" << ptr1[1] << endl ; cout << *ptr1 << ":" << *(ptr1+1 ) << endl ; delete[] ptr1 ; //int arr1[10 ] ; return(0) ; }