Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to impliment 2 or more stacks in a single dimensional
array ?



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

Post New Answer

More C Interview Questions

Explain the difference between strcpy() and memcpy() function?

0 Answers  


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

0 Answers  


Explain 'bit masking'?

0 Answers   EXL,


what is difference between overriding and overloading?

1 Answers  


Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).

1 Answers  


can we have joblib in a proc ?

0 Answers  


Are bit fields portable?

0 Answers   EXL,


which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma

16 Answers   Accenture, Infosys, TCS, Wipro,


what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }

3 Answers  


what is difference between #include<stdio.h> and #include"stdio.h"

4 Answers  


Why calloc is better than malloc?

0 Answers  


what does exit() do?

3 Answers   Cadence,


Categories