Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How is it possible to insert different type of elements in
stack?

Answer Posted / sudipto ghosh

yes it is possible to insert different types of element in a
stack.
insted of defining the member as int or float or so on. we
will define each element as a union which will be consisting
of all types of data type and only one can be used at a
time. in order to determine which type of element is being
pushed or poped we will define a flag with in union which
keeps the track of data type being used.

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data structure in programming language?

851


How does hashset work internally in java?

937


What is the use of threaded binary tree?

938


Define structure property in a heap?

928


What is the order of selection sort?

754


Explain extended binary tree.

897


How many types of lists are there?

955


Mention a few applications of linked lists?

877


Traverse the given tree using Inorder, Preorder and Postorder traversals. Inorder : D H B E A F C I G J Preorder: A B D H E C F G I J Postorder: H D E B F I J G C A

1019


Which algorithm is used in arrays sort?

847


Can we search the data in a linked list?

874


What are different types of linked lists?

847


What are the objectives of studying data structures?

1077


Define distributed query and linked server?

886


Does hashmap maintain insertion order?

870