Tuesday, February 12, 2013

What is output of following code?

int main()
{
    int key = 2;
    switch(key)
    {
        default :
            printf("In default\n");

        case 1:
            printf("In Case: 1\n");
    }
    return 0;
}

O/P:
In default
In Case: 1

No comments:

Post a Comment