Question
B is 5 years older than A and A is 7 years older than C.
If the sum of the age of A and C is 21 years, then find the sum of the ages of all three.Solution
Let C’s present age be x years. So, A’s present age = (x + 7) years And B’s present age = (x + 7 + 5) = (x + 12) years According to question, => x + 7 + x = 21 => 2x = 14 => x = 7 Required total sum = x + (x + 7) + (x + 12) = 3x + 19 = 40 years
What does $# represent in a shell script?
If a program needs to read data from a file, which system call would it typically use?
Which operator enables process substitution?
In bash, what does trap 'echo Exit' EXIT do?
Which symbol is used to comment a single line in shell scripts?
Which symbol is used in shell scripting to reference a positional parameter, e.g., the first argument passed to a script?
Which signal is sent by default when using kill without arguments?
Which operator is used for string equality comparison within `test` or `[` commands in shell scripting?
How can you pass command-line arguments to a shell script?
Which construct allows embedding a block of text in shell scripts as input?