Answer to Question #335546 in C++ for Joyboy

Question #335546

Write a C++ program to solve each problem below.

1. Create an element structure and a list structure that can store a list of integer numbers. Create 4 functions to i) Create an empty list, ii) Add a number to begin of list, iii) Add a number to end of list, iv) Add a number to specific position in the list, and v) display list. Put all of these structures and functions into a header file named: yourName-SingleLinkList.h

Hint: Following are sample function prototypes:

List* createAnEmptyList( ) void addToBeginOfList(List *ls, int data)

void displayList(List *ls) void addToEndOfList(List *ls, int data)

void addSpecificPositionInList(List *ls, int data, int position)

2. Get a number n from a user. Include the user-defined header, yourName-SingleLinkList.h, created from problem #1. Build a singly linked list to store all numbers from 1 to n. Display all data in the list.





0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS