Q1: what does realloc(ptr, 0) and malloc(0) return? Q2: how do you count all the bits in a number proportional to the number of bits set. Q3: write a function that removes all of the spaces in a string (in linear time) without allocating additional memory. Modify the input string and remove the spaces from it, without being excessively slow. (good segway: Looking at this how does it relate to issues between memcpy and memmove?) Q4: a linked list is broken and one of the nodes has broken off and points to a location in the middle. you wish to find which node this occured on to help you debug the problem. write a function that can find this looping point that uses a static amount of memory. it does not have to be fast. Q5: what is the purpose of the volatile keyword? Q6: describe this in plain english: char *foo[10]; Q7: write strncpy function Q8: create a stack that wraps around at 5 elements. Q9: describe what happens when a user enters "ls" from the keyboard into an xterm and what the shell does. complete round trip description, including the kernel, os and shell. Q10: implement a queue using only stack operations. LIFO to FIFO. (hint: you can use two stacks) Q11: how do you (in pure C) determine the direction of stack growth? Q12: what order are function arguments pushed into the stack (do not consider stack growth direction) Q13: what is the difference between LDT and GDT? Q14: how does a system call work? Q15: what are the three possible ways of providing system calls on x86? (old and new ways) Q16: how can I make say these three for loops for (a=0;a<6;a++) for (b=0;b<6;b++) for (c=0;c<6;c++) in one recursive function ? Q17: implement a function that solves the subset sub problem. brute force is allowed. for a set S of N numbers does a subset equal P. original: given a set of integers, does the sum of some non-empty subset equal exactly zero? { -7, -3, -2, 5, 8} and 0 is one example. Q18: what does if(7 < x < 49) { printf("Hello\n"); } do ? Q19: Why does this program not print anything? #include int main() { int i=0; while(i != 20, i++) printf("hello\n"); return 0; } Q20: What is wrong with this program (seems to segfault) ? int main() { char *a = "Hello "; char *b = "World!\n"; strcat(a, b); return 0; } Q21: Round a number down to the next boundry. Where B=100 and x=383, results should be 300. Q22: Round a number up to the next boundry. Where B=100 and x=383, results should be 400. Carefully note what happens when a number already on a boundry is given, it shouldn't be x=300 shouldn't be rounded up. Q23: what is the meant by a "stable sort" ? Is qsort() required to be stable?