Advertisement
cd62131

Concat String

Jul 3rd, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(void) {
  3.   char a[] = "ABC";
  4.   char b[] = "DEF";
  5.   char c[] = "GHI";
  6.   char d[100];
  7.   sprintf(d, "%s%s%s", a, b, c);
  8.   printf("%s\n", d);
  9.   return 0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement