Questions
Questions

IWBS001 Sample Exam Questions- Requires Respondus LockDown Browser

Single choice

Given the following shell variable assignments, a=10; b=5; c=3 Which of the following conditions is true?

Options
A.[ $c = ( 5 – 2 ) ]
B.[ b –gt 1 ]
C.[ $a –eq 10 –a $b –gt 5 ]
D.[ $a –le 10 ]
View Explanation

View Explanation

Verified Answer
Please login to view
Step-by-Step Analysis
Question restatement: Given the shell variable assignments a=10; b=5; c=3, which of the following conditions is true? Option 1: [ $c = ( 5 – 2 ) ] - This tries to compare c to the result of ( 5 – 2 ). In shell, the expression ( 5 – 2 ) is not a valid arithmetic expression inside [ ... ]; arithmetic should be performed with $(( ... )) or inside let. Even if you intended arit......Login to view full explanation

Log in for full answers

We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!

More Practical Tools for International Students

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!