Skip to content
Quiz · Methods · lesson 2 of 8

Quiz — a path without return

What happens when this program is compiled and run?

C#
Console.WriteLine(Abs(-7) + " " + Abs(7));

int Abs(int n)
{
    if (n < 0)
    {
        return -n;
    }
}