Home / General Knowledge / Testing sawaal :: Discussion

Discussion :: Testing sawaal

  1. What will be output when you will execute following c code?

    #include <stdio.h>
    void main()

    {
         switch(2)

          {
                case 1L:printf("No");
                case 2L:printf("%s","I");
                  goto Love;
                case 3L:printf("Please");
                case 4L:Love:printf("Hi");
         }
    }

  2. A.
    I
    B.
    IPleaseHi
    C.
    IHi
    D.
    Compilation error

    View Answer

    Workspace

    Answer : Option C

    Explanation :


    It is possible to write label of goto statement in the case of switch case statement.


Be The First To Comment