Data Structures :: Arrays - Discussion
Home > Data Structures > Arrays > MCQs Questions Discussion
6 / 76
What does the following function do if S is an array used to implement a stack.
float peep (float S[], int *t, int i)
{
float val;
if( (*t-i+1) > 0)
{
val = S[*t-i+1];
return val;
}
} ?
float peep (float S[], int *t, int i)
{
float val;
if( (*t-i+1) > 0)
{
val = S[*t-i+1];
return val;
}
} ?
AReturns the ith value from top of the stack
BReturns the value at the top of the stack
CIt gives a compilation error
DReturns the value at the ith postion of the array
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!