题目
题目

Introduction To Object Oriented Programming (082025-CMM)

单项选择题

Trace the output of the following C# code. int i = 5; int j = 10; MessageBox.Show((i > j).ToString());

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

查看解析

标准答案
Please login to view
思路分析
We start by restating the given code and the possible outputs to consider. Code snippet: int i = 5; int j = 10; MessageBox.Show((i > j).ToString()); Option a: Error - This option would be correct if there were a compile-time or runtime error in the code. However, the comparison i > j between two integers is valid in C#. The expression evaluates to a boolean value, and calling ToString() on a bool is pe......Login to view full explanation

登录即可查看完整答案

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

更多留学生实用工具

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