What is the output of this program?
If:
1) #!/bin/bash
2) a=2
3) b=4
4) let c=a**b
5) echo $c
6) exit 0
Options:
a) 8
b) 16
c) 32
d) none of the mentioned
Submitted by: Murtazab) 16
Explanation:
'**' is the exponentation operator in bash shell.
Output:
root@ubuntu:/home/google#./test.sh
16
root@ubuntu:/home/google#
Submitted by: Murtaza
Explanation:
'**' is the exponentation operator in bash shell.
Output:
root@ubuntu:/home/google#./test.sh
16
root@ubuntu:/home/google#
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. |