What is stored in ans as a result of the arithmetic expression, given the following declarations?
int ans = 0, v1 = 10, v2 = 19;
ans = v2 % v1++;
a. 1.8
b. 9
c. 8
d. 2
e. none of the above
Corrext Option : c. 8
Ex :
using System;
namespace Exercise13
{
class Program
{
static void Main(string[] args)
{
int ans = 0,v1 = 10,v2= 19;
ans = --v2 % v1++;
Console.WriteLine(+ans);
}
}
}
Outpit:8