Home » C Programming » Strings » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char s[11] = "hello";
    char *s1 = " Interview Mania";
    strncat(s, s1, 10);
    printf("%s", s);
    }
    1. hello
    2. Interview Mania
    3. hello Interview Mania
    4. hello Interview
    5. None of these
Correct Option: C

hello Interview Mania



Your comments will be displayed only after manual approval.