To add a Character to a string, simply use concatenation. When adding to strings, the + sign concatinates. Example: String one = "This is a strin"; one = one +'g'; /*OUTPUT : This is a string ...
Apr 17, 2006 · In other words to create a string in C you create an array of chars and set each element in the array to a char value that makes up the string. When sizing the string array you need to add plus one to the actual size of the string to make space for the null terminating character, “\0” Syntax to declare a string in C: