C Language Code Programming Summary: Add the value of the B array after the A array (array implementation)

Source: Internet
Author: User

Adds the value of the B array after the A array (array implementation)

The program code is as follows:

1     /*2 March 12, 2017 14:07:053 function: Adds the value of the B array after the A array (array implementation)4     */5 6#include"stdio.h"7     intMain ()8     {9         intj =0;Ten         inti =0; One         Chara[ -]; A         Charb[ -]; -printf"Please enter the string a:"); - gets (a); theprintf"Please enter string B:"); - gets (b); -          while(B[i]! =' /') -         { +i++; -         } +          while(A[j]! =' /') A         { atJ + +; -         } -         if(I <5) -         { -              for(intx =0; x < I; X + +) -             { inA[j++] =B[x]; -             } toA[J] =' /'; +         } -         Else if(I >=5) the         { *              for(inty =0; Y <5; y++) $             {Panax NotoginsengA[j++] =B[y]; -             } theA[J] =' /'; +         } A  the puts (a); +  -     } $     /* $ Summary: - results shown in vc++6.0: - —————————————————————— the Please enter a string a:asdfghjkl - Please enter a string b:dftWuyi Asdfghjkldft the —————————————————————— -     */

C Language Code Programming Rollup: Add the value of the B array after the A array (array implementation)

Related Article

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.