Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help please. i am really stuck of the push string part of this exercise. i am having trouble understanding how the pointers would work when

help please. i am really stuck of the push string part of this exercise. i am having trouble understanding how the pointers would work when reassigning the next and prev of the end node and the node im trying to insert. (to be written in c) . i also need to be able to read in a string including spaces, i was trying to use fgets but running into trouble with that. thanks image text in transcribed
Exercise: Write a double linked list with strings (char arrays) as data. Howto: I/Use this structure: struct listelement { listelement *next, *prev; char text[1000); }; 7/and this global list head: listelement *head NULL; . You program should start with printing a menu with following items: Select: 1 push string 2 print list 3 delete item 4 end program Scanf a number from the keyboard and execute the selected item. push string Reads a string, generates a new list item and the end of the list and assigns the elements data with the string. Program should go back to the start menu. print list prints the list on the screen. Each item one row. Program should go back to the start menu. delete item the oth item of a Reads a number from the keyboard corresponding to a list-item. The first item is "i". It deleted this item. Should th eitem not exist... I leave it up to you how to handle that. Program should go back to the start menu. end program Deletes the whole list and ends the program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions