Create C Program Include Following Structure Definition Struct List Int List Max Int Len C Q37294877

Create a C++ program and include the following structuredefinition:

struct List {

int list[MAX];

int len;

};

Create function stubs to add, search and remove integers to thelist, and print the list.

void add(List& l, int key);

int search(List l, int key);

void remove(List& l, int key);

void print(List l);

In main():

  • Create a List variable myList. Initialize the array elements andlen to 0.

  • Complete and use add() to add 10 integers to array in myList .Remember to increment len.

  • Complete and use search() to search for an integer in thearray.

  • Complete and use remove() to remove one of the integers from thearray.

Complete and use print() to print out the contents of thearray.


Answer


#include<iostream>
#

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.