Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Linux OS Interviews:Awk ProgrammingBash Arithmetic ExpressionsDevice DriversGCC CompilerLinux AdministratorLinux CommandsLinux DebuggingLinux EnvironmentLinux GeneralLinux IPCLinux MakefileLinux OSLinux OS EditorsLinux OS ManagementLinux OS ShellLinux Proc FilesystemLinux Search PatternLinux Shared & Static LibrariesLinux Socket ProgrammingLinux Startup and ShutdownLinux SysfsLinux SystemsLinux ThreadsLinux UbuntuSignal HandlingSystem Calls
Copyright © 2018. All Rights Reserved
Bash Arithmetic Expressions Interview Question:
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
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.