Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char *s1 = "Interview Mania ";
    char s2[] = "welcome to\n";
    strcpy(s2, s1);
    printf("%s\n", s2);
    return 0;
    }
    1. Welcome to
    2. Interview Mania
    3. Welcome to Interview Mania
    4. All of above
    5. None of these
Correct Option: B

Interview Mania



Your comments will be displayed only after manual approval.