computer science

1. Here is a short program. It prints out the value of a variable "x". Ernie and Bert disagree about what will be printed: Ernie says, the value gets changed in "changeX" so it will print "7", and Bert says, no, when the function exits the changes get reversed and the value goes back to "5". Explain who is correct and why. int x = 5; void draw() { changeX(); print(x); } voidchangeX() { int x = 7; }

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.