aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Linux and Shell Programming
  • What will be the output of the above code? x = 3; y = 5; ...
Multiple choice

What will be the output of the above code?

x = 3; y = 5; z = 10;

if [( $x -eq 3 ) -a ( $y -eq 5 -o $z -eq 10 )]
then
echo $x
else
echo $y fi

  1. Compilation error

  2. x

  3. 3

  4. 5

  5. y

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The value of 'x', which is 3, will be printed.

Keep practicing — related questions

  • Output of the following program ? #!/user/bin/sh x=22 y=28 z=5 ((z =x+y + z)) echo $z
  • What will be the output of the above code? i=5 while test $i != 0 do echo "$i" i= expr $i - 1 done
  • What will be the output of the following program : void main() { int x=5,y=6,z=2; z/=y/z==3?y/z:x*y; printf...
  • The output of the following code snippet is ___________ ( ) main( ) { int x=3,y,z; y=x=10; z=x<10; printf(n...
  • What is the output of the following piece of code? int x = 3, y = 5, z ; z = x++ + ++y; printf(“%d”,z);
  • What will be output if you will Execute following c code?
  • What is the output of the following code snippet @echo off set var = 1 %var%+=1 echo var
  • What will be the output of the program? int x = 3; int y = 1; if (x = y) /* Line 3 */ { System.out.println(...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy