C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 12, Problem 12.11E
Program Plan Intro

Program plan:

  1. String, ch, k, flag variables are used for input. There is structure stknode having ch, nextval member variables which represent the stack value.
  2. void push(stack **top, char alphabet) function inserts the node in the stack.
  3. char pop(stack **top) function delete the value in the given and returns the delete value.
  4. char peep(stack *top) function returns the value which exists at the top of the stack.
  5. void dispalystack(stack *top) function displays the contents of the stack.

Program description:

The main purpose of the program is to create a stack from the input string as a character by character. Then it compares the original string with stack value by ignoring the space and punctuation marks and checks whether input string is palindrome or not.

Blurred answer
Students have asked these similar questions
Java - Contains the Character
C++
Expression Conversion [Problem Description] Design a program which can tansfer an infix expression into a postfix expression and compute its result. Suppose the infix expression only includes’ *’, ‘/’, ‘+’, ‘-‘, ‘(‘, ‘)’ and the numbers are all integers. [Basic Requirements] You are required to use stack. The infix expression is inputted from keyboard as a string. If the input is legal, please convert the infix expression into postfix expression, calculate the result, and finally output the postfix expression and its value. If the infix expression entered is illegal, the program can prompt the user to input incorrectly and prompt the user to re-enter.                  please i need the program in c or c++ and please read the requirement below     Algorithm design: The required data structure is designed, the algorithm idea and algorithm steps are given, and the time complexity of the algorithm is analyzed. Annotated source code: Paste the source code, preferably annotate the code.…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education