how to impliment 2 or more stacks in a single dimensional
array ?
Answer Posted / sakthigurunathan
to implement two stacks in a single array consider two
stacks growing towards each other and take tos1=-1
andtos2=max as empty condition and for full condition take
tos1=tos2-1 and to insert take push1 tos1++
and for push2 tos--
| Is This Answer Correct ? | 36 Yes | 9 No |
Post New Answer View All Answers
What are the advantages of c language?
Define macros.
Why c language is called c?
Explain the difference between exit() and _exit() function?
Is array name a pointer?
What is static identifier?
Is c is a procedural language?
Explain how are portions of a program disabled in demo versions?
What is meant by realloc()?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
Explain can static variables be declared in a header file?
Write a Program to find whether the given number or string is palindrome.
Can you mix old-style and new-style function syntax?
When should a far pointer be used?
What is s in c?