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
State two uses of pointers in C?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
Calculate 1*2*3*____*n using recursive function??
Explain what is the difference between text files and binary files?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
What is memory leak in c?
Which is an example of a structural homology?
How do you define a string?
How are portions of a program disabled in demo versions?
can we implement multi-threads in c.
Suggesting that there can be 62 seconds in a minute?
Why is c platform dependent?
Difference between MAC vs. IP Addressing
What is the difference between Printf(..) and sprint(...) ?
Where define directive used?