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 is class and object in c?
Do pointers take up memory?
Lists the benefits of c programming language?
Is null always defined as 0(zero)?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain how do you sort filenames in a directory?
Is c pass by value or reference?
What is typedf?
Create a simple code fragment that will swap the values of two variables num1 and num2.
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What does the && operator do in a program code?
why return type of main is not necessary in linux
What is the best way of making my program efficient?
What is pragma c?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.