Skip to content

Commit 79b8174

Browse files
insert in array
1 parent dadd272 commit 79b8174

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

4. Array ADT/insert_in_array.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ void Display(struct Array arr)
1717
}
1818
}
1919

20+
void Append(struct Array *arr,int x)
21+
{
22+
if(arr->length<arr->size)
23+
{
24+
arr->A[arr->length++]=x;
25+
}
26+
}
27+
28+
2029
int main()
2130
{
2231
return 0;

0 commit comments

Comments
 (0)