Interviewer And Interviewee Guide

Bash Arithmetic Expressions Interview Question:

What is the output of this program?
#!/bin/bash
a=1; b=2; c=3
d=$(( ++a**b*c++ + a ))
echo $d
exit 0

a) 14
b) 12
c) program will generate an error message
d) none of the mentioned

Submitted by: Murtaza
a) 14
The operators in decreasing order of precedence are ++, **, *, +.
Submitted by: Murtaza

Read Online Bash Arithmetic Expressions Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.