Skip to content
Snippets Groups Projects

Resolve "Add peek function"

Merged narindra.rajohnso requested to merge 7-add-peek-function into main
All threads resolved!
Files
2
stack.c 0 → 100644
+ 8
0
 
#include <stdio.h>
 
#include "stack.h"
 
 
void peek(stack s, int *value){
 
if(s.top>-1 && s.top<s.capacity){
 
*value=s.data[s.top];
 
}
 
}
 
\ No newline at end of file
Loading