Some static code analyzer tools are suggesting that all strcat usage should be replaced with strncat for safety purpose?
In a program, if we know clearly the size of
It's very simple strcat is used to concatenate two strings , for example
String a= data
String b = structures
If use perform strcat
Strcat(a, b)
then
a= data structures
But if you want to concatenate specific numer of word r elements then you can use strncat Example if you want to concatenate only the first two alphabet lts of b into a then you have to write Strncat(a,b,2) (It means that you just cancatenate the fist two alphabets of b into a , and a becomes a = data st