Top

Discussion

What will be the output of the program ?

#include

int main()
{
    char str1[] = "Hello";
    char str2[10];
    char *t, *s;
    s = str1;
    t = str2;
    while(*t=*s)
        *t++ = *s++;
    printf("%s\n", str2);
    return 0;
}

 

  • A.Hello
  • B.HelloHello
  • C.No output
  • D.ello

Answer: A

No answer description available for this question.

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

Post your comment