Question
The average age of A and B is 16 years. If A is to be
replaced by C, the average would be 15 years. The average age of C and A is 17 years. Find the age of A.Solution
A + B = 2 × 16 = 32 yr B + C = 2 × 15 = 30 yr C + A = 2 × 17 = 34 yr On adding all three, 2 (A + B + C) = 32 + 30 + 34 = 96 ⇒ A + B + C = 48 ∴ A = (A + B + C) – (B + C) = 48 – 30 = 18 yr
Which of the following is TRUE about symbol tables?
In a compiler, lexical analysis is responsible for:
In a Syntax-Directed Definition (SDD), attributes are associated with:
Dynamic memory allocation (e.g., using `malloc` or `new`) typically occurs in which part of the runtime memory?
Which of the following is the first phase of a compiler?
Which of the following tasks is NOT performed during lexical analysis?
Common Subexpression Elimination (CSE) is an optimization technique that:
Which of the following is the first phase of a compiler?
A "parser" is primarily responsible for which phase of compilation?
Which of these is a bottom-up parser?