concatination using strncat

 /* strncat which is used to add or concat two string it is beneficial becaz we can concat 

with our choice 

we used 15 so we have enough memory

*/

#include <stdio.h>

#include <string.h>


int main()

{

     char destination [34] = "Rohit ";

     char source [] = "Parmar medicaps";

     

     strncat (destination , source , 6);

     // strcat (destination , "parmar" , 6);

    printf("%s " , destination);


    return 0;

}

Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation