0

Linked stack

Create a linked stack of city names. For this a c template is there with a structure called node, which has two elements: a char pointer and a next pointer. Implement functions push() and pop() for pushing and popping respectively, from the list. The push() function will take two arguments, the address of the head of the list, and the city name to be pushed. The pop() function will remove an free the top element of the list, and return the number of characters of the city name stored in that element. Use the C template below Please DO NOT MAKE ANY CHANGES to the main() program and the structure definitions given in the template. You have to only implement the functions push() and pop() as required in order to produce the desired output in this program. The behaviour of the program is - Input: 5 Accra Lagos Khartoum Ankara Athens Here 5 is the number of cities and accra, lagos... are the city names. The program should give output as : 66855 Here numeric digits are no of alphabet in reverse order

13th Nov 2021, 8:38 AM
Ravi
8 Answers
+ 1
Dear Martin Taylor , I neither want anyone to complete my assignment nor I thought sololearn to be of that kind of application. I'm making day by day progress in coding. This question is from DSA and I'm still struggling in C language. Its harsh reality of my education system that they even don't care of students' end. They just deliver their work and expect us to complete in given time .
13th Nov 2021, 12:08 PM
Ravi
13th Nov 2021, 3:50 PM
Ravi
0
Here numeric digits are number of alphabet of city name in reverse order https://code.sololearn.com/cv3g8anPiQ7x/?ref=app
13th Nov 2021, 8:39 AM
Ravi