Question
Due to fog, the speed of a train was reduced to
(2/3)rd of its original speed, resulting in a delay of 45 minutes. Find the usual time taken by the train to reach its destination.Solution
Let the distance travelled by the train be ‘d’ km, original speed be ‘s’ km/minute and usual time be ‘t’ minutes. ATQ; [d/{(2/3) × s}] = t + 45 Or, 3d = 2s × (t + 45) ………………… (1) Also, d = s × t ………………... (2) On combining equation (1) and (2), we have; 3st = 2s(t + 45) Or, 3st = 2st + 90s Or, st = 90s Or, t = 90 So, the usual time taken by the train to reach the destination is 90 minutes
What is the primary output of the lexical analysis phase of a compiler?
What is a primary advantage of generating intermediate code during compilation?
Which parsing method uses a stack and an input buffer?
Which phase of a compiler is responsible for creating a stream of tokens from the input source code?
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 of these is used for resolving operator precedence in parsing?
Which data structure is commonly used in the implementation of recursive descent parsing?
What is the purpose of Normalization in database design? Â Â Â Â Â
Which parsing technique is a top-down parser that cannot handle left recursion and requires the grammar to be free of common prefixes?
A "parser" is primarily responsible for which phase of compilation?