c string concatination using strcat

/*string concat means strcat which is used to add or concat two string
we used 15 so we have enough memory
*/
#include <stdio.h>
#include <string.h>

int main()
{
     char destination [15] = "Rohit ";
     char source [12] = "Parmar";
     
     strcat (destination , source);
     // strcat (destination , "parmar");
    printf("%s %s" , destination , source);

    return 0;
}

Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation