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)