We have been going full force with our explorations of linked lists these past few weeks. Just to make sure we are all retaining this information, please complete the following (via gimmeh), here in class, before 1:20pm.
Say we had the following:
#include "my_header.h" int main() { char (*myfunc)(int, int, char); int a, b, c, d; char e, g; char *f; a = b = 0; c = 23; d = 72; e = 16; g = 36; d = func1(a, b); myfunc = &func2; c = func3(func1(a, d), b); g = myfunc(a, b, e + 11); // <-- RIGHT HERE return(0); }
RIGHT HERE, what is the value of e, and what is the function prototype for func2?
Say we had the following (and JUST the following):
struct { char value; struct node *next; };
How would you make this node suitable for a binary tree?
Say we had the following generic Stack Operations:
stacksize(4); // set stack size push(3); push(1); push(4); push(1); push(5); push(9);
What is the second value popped off the stack?
Say we had the following generic Queue Operations:
queuesize(4); // set stack size enqueue(3); enqueue(1); enqueue(4); enqueue(1); enqueue(5); enqueue(9);
What is the second value dequeued off the queue?