Question
The digits of a two-digit number βNβ are reversed to
form a new number βMβ. If M < N and N β M = 54, then which of the following maybe βNβ?Solution
ATQ; Let the original number = N = β10a + bβ So, the new number = M = β10b + aβ ATQ; N = M + 54 So, 10a + b = 10b β a + 54 Or, 9a β 9b = 54 Or, a β b = 6 So, possible pairs of βaβ and βbβ = (9, 3), (8, 2), (7, 1) So, possible values of βNβ = 93, 82, 71 Alternate Solution From option βaβ: N = 39 So, M = 93 Since, M > N {not possible} N = 71 So, M = 17 Also, N β M = 71 β 17 = 54
What does $# represent in a shell script?
Which signal is sent by default when using kill without arguments?
Which operator enables process substitution in bash (e.g., diff <(cmd1) <(cmd2))?
Which construct allows embedding a block of text in shell scripts as input?
Which operator is used to append output to a file?
In bash, which command is used to trap and handle signals like SIGINT?
Named pipes (FIFOs) are created using:
Which operator enables process substitution?
Which command is used to display the current working directory?
A Here-Document in shell is denoted by: