Consider the following program:
int main ( ) { f1( ); f2(2); f3( ); return (0); } |
int f1( ) { return (1); } |
int f2 (int X) { f3( ); if (X==1) return f1 ( ); else return (X*f2(X$$-$$1)); } |
int f3( ) { return (5); } |
Which one of the following options represents the activation tree corresponding to the main function?
Consider the Deterministic Finite-state Automation (DFA) $$A$$ shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {$$s,p,q,r$$}, with $$s$$ being the start state and $$p$$ being the only final state.
Which one of the following regular expressions correctly describes the language accepted by $$A$$?
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions:
$$\mathrm{letter\to[A-Za-z]}$$
$$\mathrm{letter\to[0-9]}$$
$$\mathrm{id\to letter(letter\,|\,digit)^*}$$
Which one of the following Non-deterministic Finite-state Automata with $$\varepsilon $$-transmissions accepts the set of valid identifiers? (A double-circle denotes a final state)
Which of the following statements is/are CORRECT?