题目
题目

Introduction To Object Oriented Programming (082025-CMM)

单项选择题

What is the output of the following code? int i = 2; int j = 4; while (i < j) { i++; j--; } MessageBox.Show(i.ToString());

选项
A.a. 3
B.b. 5
C.c. 4
D.d. Error
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
We start with i = 2 and j = 4. The loop condition is while (i < j). Option a. 3 - In the first (and only) iteration, i is incremented to 3 and j is decremented to 3. After this iteration, the loop condition (i < j) becomes (3 < 3), whic......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!