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 is the output for the code*/ void main() { int r; r=printf("naveen"); r=printf(); printf("%d",r); getch(); }
What is the difference b/w main() in C language and main() in C++.
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is huge pointer in c?
What is a pointer?
Give the Output : * * * * * * * * * *
what is level of tree if leaf node is at level 4.please explain.
What is the difference between constant pointer and pointer to a constant. Give examples.
what is the difference between #include<stdio.h> and #include "stdio.h" ?
What does printf does?
#include<stdio.h> #include<conio.h> int main() { int a[4][4]={{5,7,5,9}, {4,6,3,1}, {2,9,0,6}}; int *p; int (*q)[4]; p=(int*)a; q=a; printf("\n%u%u",p,q); p++; q++; printf("\n%u%u",p,q); getch(); return 0; } what is the meaning of this program?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }