logo

Crowdly

Browser

Add to Chrome

Let's say that we have a fictional language that contains the following source c...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Let's say that we have a fictional language that contains the following source code (you can assume that the code is valid and compiles/runs properly)

function

main() {

  var animal = 11;

 

  function

foo(){

    var animal = 22;

function bar(){

var animal = 33;

print animal;

}

baz();

animal = 44;

bar();

  }

  function

baz() {

    var result = animal;

print result;

  }

  foo();

}

This language uses dynamic scoping. If we call the main method, What would be the value printed in the the baz method?

❌
❌
❌
❌
✅
More questions like this

Want instant access to all verified answers on moodle.concordia.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome