Question: write a code in c++ Exercise 1: (10 points) A dobble pointer is used for declaring two dimenival amass dynumically. Fer cumple, We wait so

write a code in c++
write a code in c++ Exercise 1: (10 points) A dobble pointer

Exercise 1: (10 points) A dobble pointer is used for declaring two dimenival amass dynumically. Fer cumple, We wait so inplenent a triangular 20 amay in which each nuw has soc colunn geater than the previve one. ie., the fins row has one colum, the scoond one hastwocolume, and the thind one las tree colaris and so on. You huve to take the lotal merber of nows foen the aner. Fage 3.2 shows an example of a tringelar 2D array with fex nows. Figure 3.2 Write following finction with peven prolotype: a. void AdtColunns (int o i, int aizes) The inction takes a sivjle poister by reference and dyramicaly alocals memary to it. Yoe will call this finction in main to alhcate narber of colunns be each now tum by tam. int maind it lat **pr Page 14 Lab Manual of Obest Orictha Proganines b. void Rowisetnpat (int *, int sizel This finction simply takes a poitier as an arpenert and takes iput in t foen the wer. The second arganent is the sire of ID amay poited by poiter. c. watd Rowbiseftint tint * Int stiel This finction takes a pointer as argument and griks is coetent. The secoed argenent is the sie of 1D aray poited by poeter. d. Ine main 0 In man faction yer have to do the folowing task: 1) Ask the wiser to criter the number of rows. 2) Declure a 2D array. 3) Alocate menvry for is colures in the array wirg Adocelume Funtine defined abore. 4) Take input in the 2D anny ung RonWbelnpat finction. 5) Prim the 2D armay aseg RowWisePrint finction 6) You may we bope in mai. 7) No gobal sarabkes are alkwed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!