how to impliment 2 or more stacks in a single dimensional
array ?
Answer / 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 |
What are the modifiers available in c programming language?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
How can I allocate arrays or structures bigger than 64K?
How do I use void main?
Is main a keyword in c?
what is a function method?give example?
how to construct a simulator keeping the logical boolean gates in c
Which is better between malloc and calloc?
4. main() { int c=- -2; printf("c=%d",c); }
what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks