Check the Palindrome number program in c programming YASH PAL, February 26, 2023May 28, 2024 In this tutorial, we are going to write a program in a c programming language that will get the string as input from the user and then check if the equation/string is a palindrome number or not.#include<stdio.h> #include<conio.h> #define MAXSTK 10 struct stack { int data[MAXSTK]; int top; }; int check( char []); void push(struct stack *, int); int pop(struct stack *); void main() { char str[10] = ""; int flag=0; clrscr(); printf("Enter a String:- "); gets(str); flag = check(str); if(flag == 1) printf("String is Palindrome."); else printf("String is not Palindrome."); getch(); } int check(char str[]) { struct stack s1; int i = 0; s1.top = -1; while(str[i] != '\0') push(&s1, str[i++]); i=0; while(str[i] != '\0') { if(str[i] != pop(&s1)) return(0); i++; } return(1); } void push(struct stack *p, int val) { if(isfull(*p)) { printf("Stack is Full."); return; } p->top++; p->data[p->top]=val; } int pop(struct stack *p) { int val; if(isempty(*p)) { printf("Stack is Empty."); return NULL; } val = p->data[p->top]; p->top--; return(val); } int isfull(struct stack p) { return(p.top == MAXSTK-1); } int isempty(struct stack p) { return(p.top==-1); } Facebook X.com LinkedIn Instagram Pinterest More Share this content Social Media Facebook X.com Reddit Tumblr Snapchat VKontakte Odnoklassniki Weibo QQ Douban Baidu Digg StumbleUpon Flipboard Mix Professional LinkedIn Slack Zoom XING Behance Dribbble Messaging WhatsApp Telegram Microsoft Teams Messenger Viber Line WeChat SMS Kik Threema Signal Visual Pinterest Instagram Communication Email Bookmarking Pocket Evernote Instapaper Developer GitHub GitLab Stack Overflow Dev.to Hacker News Gaming Discord Twitch Video YouTube TikTok Publishing Medium WordPress Blogger Entertainment Spotify SoundCloud Academic Mendeley ResearchGate Academia Finance Coinbase Shopping Amazon eBay Etsy Lifestyle Foursquare Yelp Utility Copy Link Print QR Code data structures Programs stack DSAprogramsstack