What will be the output of the following C# code? class Program { static void Main(string[] args) { int i ;

What will be the output of the following C# code?
class Program
{
static void Main(string[] args)
{
int i ;
for ( i = 0; i <
Code:
 5
; i++)
{
int j = 0;
j += i;
Console. WriteLine(j);
}
Console. WriteLine(i);
Console. ReadLine();
}
}
A.
Code:
0, 1, 2, 3, 4
,
Code:
 5
, 6
B.
Code:
0, 1, 2, 3, 4
,
Code:
 5
C.
Code:
0, 1, 2, 3, 4
D. 0, 1, 2, 3
 

Tìm kiếm

Back
Top