Question
Six years ago, the age of 'R' compared to the age of 'M'
six years from now was in the ratio 4:7. If the current average age of 'R' and 'M' is 33 years, what is the difference in their current ages?Solution
ATQ, Let the present age of 'R' and 'M' be βpβ years and βqβ years, respectively So, (p β 6)/(q + 6) = 4/7 Or, 7p β 42 = 4q + 24 Or, 7p β 4q = 66 ------------------ (1) Also, p + q = 2 Γ 33 = 66--------------- (2) Equation (2) Γ 4 + Equation (1), we get 11p = 330 Or, p = 30 So, q = 66 β 30 = 36 Required difference = 36 β 30 = 6 years
Which command is used to search for a pattern in files?
Which command is used to display the contents of a file in Linux?
In shell scripting, which symbol is used to redirect the standard output to a file, overwriting its contents?
In shell scripting, which command is used to read input from the user?
Which of the following is a system call used to create a new process in Unix-like operating systems?
Which symbol is used in shell scripting to reference a positional parameter, e.g., the first argument passed to a script?
Which command displays the manual page for another command?
In bash, what does trap 'echo Exit' EXIT do?
What will be the output of the following script snippet?
Β Β for item in Apple Banana Cherry; do
Β echo $item
done
How do you access the value of a variable named `USERNAME` in a shell script?