MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Insert

Method Insert

Arrays/18_Menu_Based_problem.cpp:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64}
65void Array::Insert(int index,int x)
66{
67 int i;
68 if(index>=0 && index <=length)
69 {
70 for(i=length;i>index;i--)
71 A[i]=A[i-1];
72 A[index]=x;
73 length++;
74
75 }
76}
77int Array::Delete(int index)
78{
79 int x=0;

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected