Home / C Programming / Strings :: Discussion

Discussion :: Strings

  1. 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; 
     } 
    

  2. A.

    Hello

    B.

    HelloHello

    C.

    No output

    D.

    ello

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment