Skip to content
Snippets Groups Projects
Commit c32b154f authored by narindra.rajohnso's avatar narindra.rajohnso
Browse files

rename function peek into stack_peek

parent ec3d1f08
No related branches found
No related tags found
1 merge request!5Resolve "Add peek function"
This commit is part of merge request !5. Comments created here will be created in the context of that merge request.
#include <stdio.h>
#include "stack.h"
void peek(stack s, int *value){
void stack_peek(stack s, int *value){
if(s.top>-1 && s.top<s.capacity){
*value=s.data[s.top];
}
......
......@@ -7,6 +7,6 @@ typedef struct _stack {
int top;
} stack;
void peek(stack s, int *value);
void stack_peek(stack s, int *value);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment