ANSWERS 100% ACCURATE
when does a macro with arguments have its arguments substituted for replacement
text? - ANSWER-when the macro is expanded
What is an assembler? - ANSWER-Assembles code (.s) to generate relocateable object
code(.o)
What is a Linker? - ANSWER-Combines previous compiled and assembled object code
along with standard library functions to make executable file
What is the default executable? - ANSWER-a.out
What is a Loader? - ANSWER-The loader ensures that the object programs are placed
in main memory in an executable form
What does lexical scanner output? - ANSWER-a sequence of tokens to the syntax
analyzer
lexeme keywords: - ANSWER-if, while, ...
lexeme operators: - ANSWER-+, *, <=, ||
lexeme identifiers: - ANSWER-i, i1, j1, count, sum, ...
lexeme numbers: - ANSWER-12, 3.14, 7.2E-2, ...
DFA transition function: - ANSWER-maps every possible outcome in the DFA
DFA simulation: - ANSWER-Start in state s0 and follow transitions on each input
character (state doesn't change if no input character is read)
string[:end] - ANSWER-Get all characters from the beginning of the string to end‐1
what does ord(string) do? - ANSWER-converts a string to a number
what does chr(number) do? - ANSWER-converts a number to a string
Body of a function should be ... - ANSWER-indented consistently