For the incomplete C# program below, which of the C# code fragment will not result in an infinite loop?
A.
B.
C.
D.
Code:
static void Main(string[] args)
{
int i = 1234 ,j = 0;
/*ADD CODE HERE */
Console.WriteLine(j);
}
Code:
do
{
j = j + (i % 10);
}while ((i = i / 10)!= 0);
Code:
do
{
j = j + (i % 10);
}while ((i / 10)!= 0);
Code:
do
{
j = j + (i % 10);
}while ((i % 10)!= 0);
Code:
do
{
j = j + (i % 10);
}while ((i/10 == 0)!= 0);