0

2-d array insert an element

Hello, I have been trying to insert an element into 2d int array. int a[]={2,6, 2, 3, 5} I would like to get a 2-d array 1 2 6 2 3 5 2 1 6 2 3 5 2 6 1 2 3 5 2 6 2 1 3 5 2 6 2 3 1 5 2 6 2 3 5 1 1 is an element to be insert. Please, how to do that, I was trying but not accomplish.

23rd Sep 2022, 11:19 AM
TeaserCode
1 Resposta
+ 1
TeaserCode Share your attempt here.. But arrays in c/c++/java are fixed type static data structures. You can not delete Or add elements once you created. Either use enough size prior, or create a new array.. So better to use vector instead of array.. hope it helps...
23rd Sep 2022, 11:28 AM
Jayakrishna 🇮🇳