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 |
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.
The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);
1 Answers HCL, Public Service Commission,
Program to find largest of three numbers without using comparsion operator?
macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration
12 Answers HCL, Infosys, Microsoft,
Is there anything like an ifdef for typedefs?
multiple of 9 without useing +,* oprator
main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }
22 Answers NDS, TCS,
What are header files? What are their uses?
What Is The Difference Between Null And Void Pointer?
a C prog to swap 2 no.s without using variables just an array?
What is the difference between char array and char pointer?
Explain About fork()?