Question discussion

What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }…

305037Medium 0 replies 548 views
26
What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }while( index > 9 );}
  • A1
  • B2
  • C9
  • D0.5
  • E0.25
Correct answer: B

Discussion 0

Nobody has replied yet. Start the discussion!