Question 380
An operator runs this Bash script on RHEL 10: #!/bin/bash num=81 printf "%d" "$((num % 7))" Which exact output is produced?
Explanation
Correct Answer
The modulo operator % yields the remainder after dividing 81 by seven, which is 4.
Incorrect Answers
11 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 4.
567 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 4.
88 is inconsistent with the specific Bash expansion and printf format shown. Evaluating the assignment and expression gives 4.






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