Question
The ratio of males and females in a zoo is 5:6
respectively and the percentage of children among males and the percentage of children among females are 15% and 20% respectively. If the number of adult females in the zoo is 4320 then what will be the total population in a zoo?Solution
Let the number of males and females be 5x and 6x respectively. Percentage of children among females = 20% So, 80% of females are adults, => 80/100 × 6x = 4320 => 6x = 5400 => x = 900 Total population = 5x + 6x = 11x = 11 × 900 = 9900
If an expression `x = a + b` is computed, and later in the same basic block, `y = a + b` is computed, a compiler can apply which optimization?
Which parser is most commonly used in modern compilers?
Which parsing technique is a top-down parser that cannot handle left recursion and requires the grammar to be free of common prefixes?
Which of the following is NOT a common form of 3-address code?
Which storage class in C indicates that a variable's lifetime is throughout the program execution and its scope is local to the block it is defined in, ...
Dynamic memory allocation (e.g., using `malloc` or `new`) typically occurs in which part of the runtime memory?
 What is the primary role of a "Linker"?
The primary goal of code optimization is to:
Data flow analysis is a technique used by optimizers to:
Which of the following is the first phase of a compiler?