Predict the output

arr=(1 2 3 4 5)
for i in ${arr[*]};do
	if [ `expr $i % 2` -eq 0 ];then
		temp=$( expr $i * $i))
		echo $temp
	else 
		echo ' "$i" '
	fi
done

$i 4 $i 16 $i

1 4 3 16 5

"$i" 4 "$i" 16 "$i"

"1" 4 "3" 16 "5"

Verified Answer
Correct Option - c

To get all Infosys Certified Unix Associate Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram