Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char ch1[] = "HelloInterviewMania!";
    char ch2[13];
    scanf(ch1, "%s", ch2);
    printf("%s\n", ch2);
    return 0;
    }
    1. HelloInterviewMania
    2. Nothing
    3. Undefined behaviour
    4. Hello
    5. Compilation Error
Correct Option: B

Nothing



Your comments will be displayed only after manual approval.