Linux Bash Arithmetic Expressions Question: Download Questions PDF
What is the output of this program?
#!/bin/bash
a=10
b=$(( $a<0&&$a<100 ))
echo $b
exit 0
a) 10
b) 0
c) 1
![Linux Bash Arithmetic Expressions Interview Answer Linux Bash Arithmetic Expressions Interview Question](https://globalguideline.com/public/images/interview/10.png)
Answer:
b) 0
The condition '$a<0' is false so logical and operator provides the output 0.
The condition '$a<0' is false so logical and operator provides the output 0.
Download Linux Bash Arithmetic Expressions Interview Questions And Answers
PDF