What values will be assigned to the variable ua ub uc and


What values will be assigned to the variable ua ,ub, uc and fail after execution of the following program segment:

int i=0,ua=0,ub=0,uc=0,fail=0;
while(i<=5) {
switch ( i++ )
{
case 1 :++ua;
case 2 : ++ub; uc++;break;
case 3 :
case 4 : ++uc; ua++;ub++;break;
default : ++fail;
}

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: What values will be assigned to the variable ua ub uc and
Reference No:- TGS01402337

Now Priced at $10 (50% Discount)

Recommended (95%)

Rated (4.7/5)