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 |
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
how to determine the complexity of an algorithm as log(n)
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?
what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }
The differences between Windows XP and Windows Visa
wap to print "hello world" without using the main function.
write a proram to reverse the string using switch case?
How does placing some code lines between the comment symbol help in debugging the code?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
Tell me what is null pointer in c?
hi send me sample aptitude papers of cts?