C – Strncat

C – Strncat 2017-08-06T08:59:44+00:00

strncat()

strncat (str1,str2,n) concatenates not more than n characters  of the string pointed to by str2 to the the string pointed to by str1 and terminates str1 with a null. The first character of str2 overwrites the null terminator originally ending sr1. The str2 is untouched by the operation.

C – STRING EXAMPLE PROGRAM :

Output :

Before concatenation :

str1: www.learner

str2:mode.com

After concatenation :

str1: www.leranermode

str2:mode.com

 

Prev Next