TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
csharp beginner
NA
38
12k
inserting a value
Nov 10 2013 2:08 PM
I want to insert some values to an array.
The array would not have any fixed size and would be containing some elements. Now, what i want to do is : insert certain elements(values), at certain index positions. But, the element which was already there at that index position would not be deleted, else would be shifted a position next. Thus, inserting a new element at the required position and also keeping all the elements without deleting any, at the mean while, the size of the array would also be increased (as obviously).
Example:
int[] arr = { 22, 32, 45, 68, 92};
If i insert an element (say, 46) at 2nd position in the array, then, array should become
arr = {22, 46, 32, 45, 68, 92}
Can anybody help?
Regards
Reply
Answers (
2
)
input from user to know pattern of movement.
Garbage collection with example