quiz questions about Linux system simulation programming assignment. simulating Linux tree system
Review for QUIZ
1. char *s = “/a/b/c” denotes a pathname.
Write C code to tokenize s into token strings
2. NODE *parent points at a parent node, *q points at a new node.
Write C code to add q as a CHILD of the parent node.
3. Each node has a int key value.
NODE *p points at a DIR node.
Write C code to search for a CHILD node of p with a given key value.
Return the node pointer if it exist, return @ if not.
4. Given int (afptr[ DO = { fi, f2, f3, f4 }; an index=2.
Write C code to call the function corresponding to the index.