Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. What is the output of this C code?

    int main()
    {
    printf("C programming %s", "Class by\n%s AllIndiaExams", "SUPER");
    }
  2. A.
    C programming Class by SUPER AllIndiaExams
    B.
    C programming Class by\n%s AllIndiaExams
    C.
    C programming Class by %s AllIndiaExams
    D.
    Compilation error

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    This program has only one %s within first double quotes, so it does not read the string "SUPER.
    The %s along with the AllIndiaExams is not read as a format modifier while new line character prints the new line.


Be The First To Comment