Top

Discussion

What will be the output of the program?

#include
#include

int main()
{
    char dest[] = {97, 97, 0};
    char src[] = "aaa";
    int i;
    if((i = memcmp(dest, src, 2))==0)
        printf("Got it");
    else
        printf("Missed");
    return 0;
}

 

  • A.Missed
  • B.Got it
  • C.Error in memcmp statement
  • D.None of above

Answer: B

No answer description available for this question.

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

Post your comment