The operations mentioned are usually implemented with a linked list.
The definition for a list element is usually this:
struct Node {
int data;
struct Node *next;
};
In the main program, you can then use it as follows:
int main()
{
struct Node *head = NULL;
head = insertNode(head, 5); ...
return 0;
}
The first function required would then be insertNode(), which inserts a new element into the list.
The prototype for this could look like this, for example:
struct Node* insertNode(struct Node *head, int value);
The optimal data structure depends on the specific requirements of the program. If frequent access to random elements is important or sorting operations are to be performed frequently, an array might be more suitable; linked lists offer good performance when inserting and deleting elements. A search tree could also be considered for a high-performance search. However, the implementation of a search tree is more complex than that of a linked list.
That should be enough for you to manage the rest yourself. If something does not work, specific questions would be necessary.