How can you insert different type of elements in a stack?

stack is a linear data structure in which data item is either inserted or deleted at one end there are mainly two operations performed on stack.they're push pop push:writing a value to the stack is push or moving the stack pointer up to accomodatethe new item. pop:reading a value from stack or moving the stack pointer down.