1.

Identify the error in the following code :switch (c){case 9.0 : a = a + 2 ;break ;case 8.0 : a = a + 3 ;break ; }

Answer»

Default case is missing in the given switch code which is optional but necessary. When user gives a wrong choice then default case’s statement is executed.



Discussion

No Comment Found

Related InterviewSolutions