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
Submitted by: Murtazab) 0
The condition '$a<0' is false so logical and operator provides the output 0.
Submitted by: Murtaza
The condition '$a<0' is false so logical and operator provides the output 0.
Submitted by: Murtaza
Read Online Bash Arithmetic Expressions Job Interview Questions And Answers
Top Bash Arithmetic Expressions Questions
☺ | Which command puts a script to sleep untill a signal is recieved? |
☺ | Which statement resumes the next iteration of a for, while, select, or until loop? |
☺ | Which command sets up shorthand for command or command line? |
☺ | Which command concatenate the specified argument into a single command, then execute the command? |
☺ | Which command identifies the resource of a command? |
Top Linux OS Categories
☺ | Device Drivers Interview Questions. |
☺ | Linux OS Management Interview Questions. |
☺ | Linux Makefile Interview Questions. |
☺ | Linux Environment Interview Questions. |
☺ | Linux OS Shell Interview Questions. |