what is a stack

Answers were Sorted based on User's Feedback



what is a stack ..

Answer / srilatha

STACK IS A COLLECTION R HEAP OF ELEMENTS IN FIRST IN LAST
OUT METHOD.

Is This Answer Correct ?    17 Yes 2 No

what is a stack ..

Answer / naresh lingampally

Stack is a data structure ,a last in, first out (LIFO)
abstract data type.
A stack can have any abstract data type as an element, but
is characterized by only two fundamental operations: push
and pop. The push operation adds to the top of the list,
hiding any items already on the stack, or initializing the
stack if it is empty. The pop operation removes an item from
the top of the list, and returns this value to the caller. A
pop either reveals previously concealed items, or results in
an empty list.

Is This Answer Correct ?    5 Yes 0 No

what is a stack ..

Answer / eresh

stack is a part of ram memory

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Interview Questions

Discuss the function of conditional operator, size of operator and comma operator with examples.

0 Answers   TCS,


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

0 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

2 Answers   ME,


What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?

3 Answers  


what wud be the output? main() { char *str[]={ "MANISH" "KUMAR" "CHOUDHARY" }; printf("\nstring1=%s",str[0]); printf("\nstring2=%s",str[1]); printf("\nstring3=%s",str[2]); a)string1=Manish string2=Kumar string3=Choudhary b)string1=Manish string2=Manish string3=Manish c)string1=Manish Kumar Choudhary string2=(null) string3=(null) d)Compiler error

9 Answers   Infosys,






WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h> #include<conio.h> void main() { int k=20; printf("%d%d%d%d",k,k++,++k,k); getch(); }

25 Answers  


What is the use of putchar function?

0 Answers  


Why do we need volatile in c?

0 Answers  


what is the difference between <stdio.h> and "stdio.h"

14 Answers   Invendis, Kanbay, Mastek, MathWorks,


What is the use of gets and puts?

0 Answers  


Write a program to find the smallest and largest element in a given array in c language

11 Answers   Microsoft, Vembu,


2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above

4 Answers   Siemens,


Categories