[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

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;
}
} ?

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 ::

Post Your Answer Here:     

No Discussion on this question yet!