ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
how to impliment 2 or more stacks in a single dimensional
array ?
 Question Submitted By :: Gautham
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to impliment 2 or more stacks in a single dimensional array ?
Answer
# 1
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 ?    5 Yes 0 No
Sakthigurunathan
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program to generate 1st n fibonacci prime number  1
34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?  2
what is difference between array of characters and string Accenture10
pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc() TCS1
what is the different between if-else and switch statment (other than syntax) CTS9
what is the difference between c and java?  1
Write a program to accept a character & display its corrosponding ASCII value & vice versa?  4
Why preprocessor should come before source code?  2
WHY DO WE USE A TERMINATOR IN C LANGUAGE?  2
What ios diff. Between %e & %f? Honeywell1
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc  2
how memory store byte Huawei3
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50 TCS2
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance IBM1
who did come first hen or agg Infosys12
Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV Accenture3
how many keywords do C compile? Microsoft2
When is an interface "good"?  1
4.weight conversion: Write a program that will read weight in pounds and convert it into grams.print both the original weight and the converted value.There are 454 grams in a pound.design and carry out a test plan for this program. Wipro1
plz answer.... write a program that reads line (using getline) e.g."345", converts each line to an integer using "atoi" and computes the average of all the numbers read. also compute the standard deviation.  1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com