Theory questions about Compilers
1 When you are setting a bit flag (position "p"), what is the mask that you need to use and what is the operation required? What is supposed to be the mask value for reset and what is the operation? Give one example.
2.
In the buffer code, identify the problems if:
(a) You do not use a temporary variable to realloc buffer;
(b) You do not test the buffer before each function.
(c) You do not free the memory in case of error
3. In buffer, what is the purpose for setting bits EOB (end of buffer) and RLC (rellocation) and in which functions it is supposed to happen?
4. Is it possible to change buffer.h constants and typedefs that do not require modifications in the code of buffer.c? Explain and give an example.
Comments
Leave a comment