C Programming - Strings - Discussion

Discussion Forum : Strings - Find Output of Program (Q.No. 19)
19.
What will be the output of the program ?
#include<stdio.h>

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;
}
Hello
HelloHello
No output
ello
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
22 comments Page 3 of 3.

Varsha said:   8 years ago
You are right, Thank you @Pawan.

Saurabh said:   1 decade ago
@wikilok is current ...


Post your comments here:

Your comments will be displayed after verification.