Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Shell & Script programming with Unix Increment and Precedence. a=-2; b=3; c=5 ans = $((++a - b++ * ++c)) echo ans1==$ans, a==$a, b==$b, c==$c; Output

Shell & Script programming with Unix

Increment and Precedence.

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 _________________________________________

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

List four ways in which the CNS is protected.

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago