C Program of reversing a string using stack
Data Structure Stack Data Structure (Article) Stack Data Structure (Program)
1110Program:
/* Program of reversing a string using stack */ #include #include #include #define MAX 20 int top = -1; char stack[MAX]; char pop(); void push(char); main() { char str[20]; unsigned int i; printf("Enter the string : " ); gets(str); /*Push characters of the string str on the stack */ for(i=0;i
Output:
Enter the string : HelloWorld Reversed string is : dlroWolleH Press any key to continue . . .
Explanation:
NILL
This Particular section is dedicated to Programs only. If you want learn more about Data Structure. Then you can visit below links to get more depth on this subject.