Which of the following correctly describe the output of the ANSI C function below, if passed a value of "5"? #include


Which of the following correctly describe the output of the ANSI C function below, if passed a value of "5"?
#include<>
void process(int i)
{
    printf("begin\n");
    switch (i)
    {
    case 5:
        printf("slow\n");
    case 6:
    default:
        printf("halt\n");
    case 1:
    case 2:
        printf("waiting\n");
        break;
    case 3:
        printf("forward\n");
        goto cleanup;
    case 4:
        printf("reverse\n");
        break;
    }
    printf("end\n");
    return;
cleanup:
    /* ... */
}




A)    begin
        slow
        halt


B)   begin
       slow
       end


C)    begin
        end


D)   begin
       slow
       halt
       waiting


E)    begin
        slow
        halt
        waiting
        end



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here