Write Syntax Create Dynamic Array Pointers Integers Called Ptrarray Size M C Asap Q37021106

write the syntax to create a dynamic array of pointers(to integers) called ptrarray of size m
c++ asap


Solution


//// ================================ pointersdemo.cpp==============================

#include <iostream>

using namespace std;

int main() {

   //Variable to store size of the array
   int m;

   cout << “Enter Size M for the array :”;
   cin >> m;

   cout << “Creating dynamic array of pointersto integers of size :” << m << “n”;

   // Create array of pointers to integers of sizem
   // Note : 1) Pointer to integer (int) will resolve toint*
   // Note : 2) Array of pointers to integers (int*[])will resolve to int**

   // First allocate array

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.