Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can use some help with Linux/UNIX Increment and Precedence please: a=-2; b=3; c=

ID: 3788518 • Letter: C

Question

Can use some help with Linux/UNIX Increment and Precedence please:

a=-2; b=3; c=5

ans=$((++a - b++ * ++c))

echo "ans1==$ans, a==$a, b==$b, c==$c”

Output 1:

a=-2; b=3; c=5

(( ans2 = --a + ++b % c-- ))

echo "ans2==$ans2, a==$a, b==$b, c==$c"

Output 2:

a=-2; b=3; c=5

ans3=$(( ++b / a-- * - ++c ))

echo "ans3==$ans3, a==$a, b==$b, c==$c"

Output 3:

a=-1; b=0; c=2;

(( r4 = ++a && b-- || -c--))

echo "ans4== $r4, a== $a, b== $b, c== $c"

Output 4:

a=-1; b=0; c=2

(( r5 = -a-- && -++b || c--))

echo "ans5== $r5, a== $a, b== $b, c== $c"

Output 5:

Explanation / Answer

need more information.

I'm not getting your question perfactly can you please elobarate.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote