I have an array
a[]= {34,45,65,55,67}
I need C or TCL code to build a new array with the each element repeated ‘N’ times.
For example when n=2 , resultant array should be
b[]= {34,34,45,45,65,65,55,55,67,67}
similarly when n=3, array should be
b[]={34,34,34,45,45,45,65,65,65,55,55,55,67,67,67}
How can i do this ???
1 Answer