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...


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).



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here