I declared a structure like this
#define max_size 100
struct lifo
{
int top;
int st[max_size];
};
I made a function like so:
void create(stack *s)
{
s->top=-1;
}
I declared a pointer in the main() function:
struct lifo *s;
I called this function like so:
create(s);
but it shows "segmentation fault" at
s->top=-1
I am not sure what is the error