Detect the fl aws in the following code segment:
fl oat x = 5.5;
switch (x) {
case 5.5: printf(“Number is 5.5\n”);
default: printf(“Some other number\n”);
}
Write a program using switch that accepts an integer between 1 and 7 and prints whether the
number represents a weekend (Saturday or Sunday) or not (Sunday = 1).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here