About 50 results
Open links in new tab
  1. How do I concatenate two strings in C? - Stack Overflow

    May 22, 2017 · C does not have the support for strings that some other languages have. A string in C is just a pointer to an array of char that is terminated by the first null character. There is no string …

  2. How do I concatenate const/literal strings in C? - Stack Overflow

    Nov 21, 2008 · 496 In C, "strings" are just plain char arrays. Therefore, you can't directly concatenate them with other "strings". You can use the strcat function, which appends the string pointed to by src …

  3. better way to concatenate multiple strings in c? - Stack Overflow

    36 Is there a better way to concatenate multiple strings together in c other than having multiple calls to strcat () all in a row, like below?

  4. C: What is the best and fastest way to concatenate strings

    30 I currently concatenate strings in c using the strcat() function from string.h library. I thought about it, and I got to a conclusion that it should be very expensive function, as before it starts to concatenate, …

  5. How to concatenate string and int in C? - Stack Overflow

    I want to give +1, but the first line of your answer rather contradicts the rest of it. You've shown that in fact the solution is easy; you just have to throw out the notion that inefficient string concatenation …

  6. C/C++ macro string concatenation - Stack Overflow

    Mar 10, 2011 · 151 You don't need that sort of solution for string literals, since they are concatenated at the language level, and it wouldn't work anyway because "s""1" isn't a valid preprocessor token.

  7. c - How does concatenation of two string literals work? - Stack Overflow

    Aug 25, 2012 · It's defined by the ISO C standard, adjacent string literals are combined into a single one. The language is a little dry (it is a standard after all) but section 6.4.5 String literals of C11 states: In …

  8. String concatenation in C - Stack Overflow

    Apr 28, 2010 · if I want to construct a const char * out of several primitive type arguments, is there a way to build the string using a similar to the printf?

  9. c# - Most efficient way to concatenate strings? - Stack Overflow

    The String.Join answer below doesn't do + justice and is, practically speaking, a bad way to concatenate strings, but it is surprisingly fast performance wise. The answer why is interesting. String.Concat and …

  10. Concatenating strings in C - Stack Overflow

    Jun 9, 2009 · How to concatenate strings in C, not like 1 + 1 = 2 but like 1 + 1 = 11.