| 1. |
What is concatenation? Explain with example.OrExplain the mechanism of Concatenation of a new word in a string. |
|
Answer» Concatenation: Concatenation means joining of two different strings to form one string. In ‘C’, streat function is used to do concatenation. STRCAT(): This function appends or concatenates the source string at the end of the target string. For example, “Rajeev” and “Sharma” on concatenation would result in a string “Rajeev Sharma”. The length of the resulting string is strlen(dest) + strlen(src). void main() Output: source string = Rajeev target string = Sharma Rajeev. |
|