1032:c Language Programming Tutorial (third Edition) after class exercise 8.6

Source: Internet
Author: User

Title Description Write a function to concatenate two strings into a string sample input after two lines of string output link
123abc
Sample output
123abc

1#include <stdio.h>2#include <string.h>3 4 voidStr_cat (CharS1[],Chars2[])5 {6     intL1 =strlen (S1);7     intL2 =strlen (S2);8     inti;9 Ten      for(i = L1; i < L1 + L2; i++) One     { AS1[i] = s2[i-L1]; -     } -  theS1[i] =' /'; - } -  - intMainintargcChar Const*argv[]) + { -     Chars1[Bayi], s2[Bayi]; +      Ascanf"%s", S1); atscanf"%s", S2); -  - str_cat (S1, S2); -  -printf"%s\n", S1); -     return 0; in}

1032:c Language Programming Tutorial (third Edition) after class exercise 8.6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.