mplementation of stack using any programing language

Answer Posted / aravind

1. stack as an array or linked list (two ways)
2.define array.
3.perform push operation by taking one more array.
4.perform pop and store the popped items
5.display function to print the popped values
6.make sure you reach LIFO

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of functions in c?

756


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

985


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3426


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1596


Explain continue keyword in c

767


What functions are used in dynamic memory allocation in c?

781


Give differences between - new and malloc() , delete and free() ?

845


List the difference between a 'copy constructor' and a 'assignment operator' in C?

844


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

848


Suggesting that there can be 62 seconds in a minute?

790


What is dangling pointer in c?

807


writ a program to compare using strcmp VIVA and viva with its output.

1762


When can you use a pointer with a function?

744


How can I implement a delay, or time a users response, with sub-second resolution?

831


What does the c preprocessor do?

843