strcat() function
Posted by
Ravi Kumar at Friday, September 23, 2011
Share this post:
|
0 Comments
This function concatenates the source string at the
end of the target string. For example "Bombay" and "Nagpur"
on concatenation would result into a string "BombayNagpur".
Here is an example of strcat() at work.
main()
{
strcat(target, source);
printf("\n source string = %s", source);
printf("\n target string = %s", target);
}
output:source string = Folks
target string = HelloFolks
Note that the target string has been made big enough
to hold the final string .