Question
How should I write my sqjuggler.h and sqjuggler.c files so that the input and output is as such, I've started both of the files but
How should I write my sqjuggler.h and sqjuggler.c files so that the input and output is as such,
I've started both of the files but I am stuck.
sqjuggler.c
#include
#define STACK_SIZE 20
int main(char *argv[]) { FILE *fp=fopen(argv[1],"r"); if(fp==NULL) { printf("Error: can't open file to read "); }
//help
return 0; }
sqjuggler.h
#ifndef STACKADT_H #define STACKADT_H
#ifndef QUEUEADT_H #define QUEUEADT_H
#include
#define QUEUE_SIZE 20
typedef int Item;
typedef struct stack_type *Stack;
void create(void); void destroy(Stack s); void make_empty(Stack s); bool is_empty(Stack s); bool is_full(Stack s); void push(Stack s,int i); Item pop(Stack s);
void create(void); void destroy(Queue q); void make_empty(Queue q); bool is_empty(Queue q); bool is_full(Queue q); void insert(Queue q,int i); int remove_que(Queue q); int first(Queue q); int last(Queue q);
#endif
test.dat add 3 add 2 delete add 5 delete add 10 add 7 delete add 0 delete add 11 delete delete delete Input format: /sqjuggler test.dat Output format outStack: 11 0 7 10 5 2 3 outQueue: 257 0 11 10 3 test.dat add 3 add 2 delete add 5 delete add 10 add 7 delete add 0 delete add 11 delete delete delete Input format: /sqjuggler test.dat Output format outStack: 11 0 7 10 5 2 3 outQueue: 257 0 11 10 3Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started