Top

Discussion

What will be the output of the following C code?

#include 
    int main()
    {
        char str[10] = "hello";
        char *str1 = "world";
        strncat(str, str1, 9);
        printf("%s", str);
    }

 

  • A.helloworld
  • B.Undefined behaviour
  • C.helloworl
  • D.hellowor

Answer: A

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment