Question 370
An operator runs this Bash script on RHEL 10: #!/bin/bash left=40; right=31 printf "%s" "$((left-right))" Which exact output is produced?
Explanation
Correct Answer
Arithmetic expansion evaluates the integer difference 40-31=9; it does not concatenate the variables.
Incorrect Answers
71 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 9.
1240 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 9.
-9 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 9.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests