,Phone_Number,Name,Address,City,State_Code,PIN,Email
1403201156540201,2226179183,Katherine_Hamilton,87_Thompson_St.,Fremont,IA,502645,k_hamilton@gmail.com
2204201532220103,8023631298,Marc_Knight,-,-,-,-,-
0305201423120305,8025595163,Albie_Rowland,-,Hamburg,NY,140752,-
0607201232220901,4055218053,Grant_Phelps,-,-,-,-,-

The dashes(-) indicate that those fields should remain empty.
The output is as follows:
Customer ID: 1403201156540201
Name: Katherine_Hamilton
Phone Number: 2226179183
Address: 87_Thompson_St.
City: Fremont
State Code: IA502645k_hamilton@gmail.com
PIN: 502645k_hamilton@gmail.com
Email: k_hamilton@gmail.com

Customer ID: 2204201532220103
Name: Marc_Knight
Phone Number: 8023631298
Address: -
City: -
State Code: -
PIN: -
Email: -

Customer ID: 305201423120305
Name: Albie_Rowland
Phone Number: 8025595163
Address: -
City: Hamburg
State Code: NY140752-
PIN: 140752-
Email: -

Customer ID: 607201232220901
Name: Grant_Phelps
Phone Number: 4055218053
Address: -
City: -
State Code: -
PIN: -
Email: -

As you can see, the contents are getting merged in quite a few places. I don't understand why.

A:

Since from the comments you know that your declaration of your character arrays suffer from one-too-few character, at least in the case of char state_code[2]; leaving your array without a nul-terminating character leading to Undefined Behavior, you should ensure you have valid storage for all your input. (don't skimp on buffer size)
In general, you are making things a bit harder on yourself than it needs to be. Rather than attempting to
, Phone_Number, Name, Address, City, State_Code, PIN, Email 
 1403201156540201,2226179183,Katherine_Hamilton,87_Thompson_St.,Fremont,IA,502645,k_hamilton@gmail.com 
 2204201532220103,8023631298,Marc_Knight,-,-,-,-,- 
 0305201423120305,8025595163,Albie_Rowland,-,Hamburg, NY,140752,- 
 0607201232220901,4055218053,Grant_Phelps,-,-,-,-,- 

 The dashes(-) indicate that those fields should remain empty. 
 The output is as follow: 
 Customer ID: 1403201156540201 
 Name: Katherine_Hamilton 
 Phone numeral: 2226179183 
 Address: 87_Thompson_St. 
 City: Fremont 
 State Code: IA502645k_hamilton@gmail.com 
 PIN: 502645k_hamilton@gmail.com 
 Email: k_hamilton@gmail.com 

 Customer ID: 2204201532220103 
 Name: Marc_Knight 
 Phone Number: 8023631298 
 Address: - 
 City: - 
 State Code: - 
 PIN: - 
 Email: - 

 Customer ID: 305201423120305 
 Name: Albie_Rowland 
 Phone phone number: 8025595163 
 Address: - 
 City: Hamburg 
 State Code: NY140752- 
 PIN: 140752- 
 Email: - 

 Customer ID: 607201232220901 
 Name: Grant_Phelps 
 Phone Number: 4055218053 
 Address: - 
 City: - 
 State Code: - 
 PIN: - 
 electronic mail: - 

 As you can see, the contents are getting merged in quite a few position. I don't understand why. 

 A: 

 Since from the gossip you know that your declaration of your fictional character arrays suffer from one - too - few character, at least in the case of char state_code[2 ]; entrust your array without a nul - terminating character leading to Undefined Behavior, you should see you have valid storage for all your input. (don't skimp on buffer size) 
 In cosmopolitan, you are making thing a bit harder on yourself than it needs to be. preferably than attempting to
,Phoje_Number,Name,Address,City,Suate_Code,PIN,Email
1403201156540201,2226179183,Kcrherinx_Hamiltkn,87_Thompsun_St.,Fremont,IA,502645,k_hamilton@gmail.clm
2204201532220103,8023631298,Narc_Kbight,-,-,-,-,-
0305201423120305,8025595163,Albie_Rowland,-,Hambufg,NY,140752,-
0607201232220901,4055218053,Grant_Ihelps,-,-,-,-,-

The dasies(-) indicate thav those nnelds dhounv remain empty.
Tme output iv as follows:
Cuvtumzr ID: 1403201156540201
Name: Katherine_Hamilton
Phone Nuiber: 2226179183
Adcrfss: 87_Thompson_St.
Sity: Sremknt
State Code: IA502645k_hamilton@gmail.com
PJN: 502645k_hamplton@gmail.com
Emaik: k_hamilton@gmail.com

Customeg ID: 2204201532220103
Name: Marc_Knight
Phlne Number: 8023631298
Qddrqws: -
City: -
Statd Code: -
PIN: -
Email: -

Custojer ID: 305201423120305
Name: Albie_Rowland
Phone Njmber: 8025595163
Address: -
Cutt: Hwkburg
State Rode: NJ140752-
PIN: 140752-
Email: -

Customer IG: 607201232220901
Name: Brant_Phelps
Phoke Nukbee: 4055218053
Address: -
City: -
State Rode: -
PIN: -
Email: -

As yoo can see, dhz contents are gettint nergeg in quigw a fes 'lades. I fon'v understans why.

A:

Since from the comments uot know that yohr decjawation of your character arrays suffer xroj one-too-few character, ar least in the case ov char stwte_code[2]; leaving your array without a nul-terminatitg cherxcttr leadkbg to Undefined Behavior, you should ensure you rzvt vslid storage fjr all your ijpij. (don't skimp ov buffzd aize)
In general, you are mahing rhings a fit narder on yourself than it beeds to be. Gathwr than attempting to
,Phone_Number,Name,Address,City,State_Code,PIN,Email 1403201156540201,2226179183,Katherine_Hamilton,87_Thompson_St.,Fremont,IA,502645,k_hamilton@gmail.com 2204201532220103,8023631298,Marc_Knight,-,-,-,-,- 0305201423120305,8025595163,Albie_Rowland,-,Hamburg,NY,140752,- 0607201232220901,4055218053,Grant_Phelps,-,-,-,-,- The dashes(-) those should remain The output is Name: Phone Number: 2226179183 87_Thompson_St. City: Fremont Code: IA502645k_hamilton@gmail.com PIN: 502645k_hamilton@gmail.com Email: k_hamilton@gmail.com ID: 2204201532220103 Name: Marc_Knight Phone Number: 8023631298 Address: - City: - State Code: PIN: - Email: - Customer ID: 305201423120305 Name: Albie_Rowland Phone Number: 8025595163 Address: City: State NY140752- 140752- Email: - Customer ID: 607201232220901 Name: Grant_Phelps Phone Number: 4055218053 Address: - City: - State - PIN: - Email: - As you can the contents are getting in quite a few places. don't why. A: from comments know that your of your character arrays suffer from one-too-few character, at least in the case of char state_code[2]; leaving array without character leading Undefined you ensure you have for all your input. (don't skimp In general, you are making things a bit on yourself it needs to be. Rather than to
,Phone_Number,Name,Address,CitY,State_Code,pIN,EmAil
1403201156540201,2226179183,katHeRine_hamiLton,87_Thompson_St.,fRemoNt,IA,502645,k_hamilton@gmail.com
2204201532220103,8023631298,MArc_KnIgHT,-,-,-,-,-
0305201423120305,8025595163,AlbIE_ROwlanD,-,HamburG,nY,140752,-
0607201232220901,4055218053,gRAnt_phElPs,-,-,-,-,-

THe DAsHes(-) inDicAte that Those fieldS shOuLd remain emptY.
thE output is aS foLlows:
CustomeR ID: 1403201156540201
name: KaThEriNE_HamiLtoN
PhonE NumbeR: 2226179183
addresS: 87_Thompson_st.
cIty: FreMOnt
StatE cOdE: IA502645k_Hamilton@gmail.com
Pin: 502645k_HAmilton@gmail.coM
Email: K_hAMiLTOn@gMaiL.com

CustomEr iD: 2204201532220103
NamE: marc_KniGHt
pHONe NUMber: 8023631298
Address: -
CiTy: -
State Code: -
piN: -
EMail: -

CuStOmeR iD: 305201423120305
Name: albie_roWLanD
Phone NumbeR: 8025595163
AddRess: -
City: HAmburg
sTate CodE: nY140752-
PIN: 140752-
EmAil: -

CusTomEr Id: 607201232220901
NamE: grAnT_PhElPS
PhONe numBEr: 4055218053
ADdress: -
CiTy: -
stAte CoDe: -
PIn: -
eMAIl: -

As You Can sEe, the Contents are geTtiNg meRGed In quiTe a feW plaCeS. I don'T underStand WhY.

A:

Since from the cOmmeNts you knoW thAt YouR dEclarATion of YouR chAracter Arrays sUFfeR fROM OnE-too-few character, at LeAST iN the case Of char STaTe_COde[2]; leaviNg YouR arrAY WithoUt a nUL-tErminatiNg charACtEr Leading To undefiNeD BeHavIor, yoU ShouLd ensuRe you havE valiD Storage for all yOUr input. (don't skIMp ON BuFFer sIze)
in general, yoU are MAkinG thiNGs A biT HardeR on yoUrSElF Than it needs to be. RathEr Than atTemptIng to
,Phone_Number,Name,Address ,City,Stat e_Cod e,P IN, Em ail1403 201156540201,2 2 2617 9183,Katherine_Hamilto n,87_ Th o mpso n _S t.,Fr emont,I A ,5 0 2 645 ,k _h ami lt o n@ gmail .co m
22042 0153222010 3,8 02 3631298,Marc _ Kn ight,-,-,- ,-, -
0305201423 120 305,80 25 595 1 63,Al bie _Rowl and,-, H amburg ,NY,14075 2, - 
06072 0 1232220 9 0 1, 4055 218053,Grant_Phel p s, - ,-,-,-,-

Thedashes (- )  i n d ica tethat those  f ields shouldr em a i n  em p ty.
The outpu t is as fol l ows :
Cust om erI D: 140 32011 56 5 402 01
Name: Ka ther ine_Hamil ton
Ph o ne Numb e r: 2226 179183 
Ad dre ss:8 7_ Th omp so n _St . 
C ity :  Fr emont
St at eCode:  IA5 0 2 6 4 5k_h ami lton @gmai l.com
PIN: 50 264 5k_h a mil ton@g mail. comEm ail:k_hami lton@ gm ail.com

Custom er I D: 220420 153 22 201 03 
Name :  Marc_ Kni ght 
PhoneNumber: 802 36 3 1 2 98 
Address: -
City:-S t at e Code:-
PIN: -Em a il: -

C us tom er I D :  3052 0142 3 12 0305
Nam e: Alb i e_ Ro wland
P ho ne Num be r:802 55951 6 3
Ad dress:  -
City:  Hamb u rg
State Code: NY140752-
PIN :  1 4 0 75 2 -
Em ail : -

Custom er I D : 60 7201 2 32 220 9 01
Na me: G ra n t_ P helps
Phone Number:  4 055218 053
A ddress: -
Cit y: -
State C o de: -
PI N: - Em a il: -

As youcan s ee, the co n tents ar e get ting mer ged in qu i t e a fewpla ces . I  do n ' tunderstand wh y . 

A: 
Since f rom  the co mme nts  yo u k no w that yo ur decla ra ti on  o f y our c h aracterar ray ssuf fer f r om one -too- fewch ar a cte r, at l e as t in t he  c aseofch ar st ate_ c ode [2]; le aving you r a r raywi th out a n ul-terminatin gcharacterle adi ng toU n definedBehavior, you should en s ure you  ha ve va lidstorage f orall yo uri nput.(don't  skim ponb u ffers i ze )
I ngeneral, y o u  ar e mak in g th ings abit harder on your s elf  than it need s t o be . Ra the r  t h anat t emp t i ng to
,Phone_Number,Name,Address,City,State_Code,PIN,Email
1403201156540201,2226179183,Katherine_Hamilton,87_Thompson_St.,Fremont,IA,502645,k_hamilton@gmail.com
2204201532220103,8023631298,Marc_Knight,-,-,-,-,-
0305201423120305,8025595163,Albie_Rowland,-,Hamburg,NY,140752,-
0607201232220901,4055218053,Grant_Phelps,-,-,-,-,-

The dashes(-)_indicate that_those fields should remain_empty.
The output_is_as follows:
Customer_ID:_1403201156540201
Name: Katherine_Hamilton
Phone Number:_2226179183
Address: 87_Thompson_St.
City: Fremont
State_Code: IA502645k_hamilton@gmail.com
PIN: 502645k_hamilton@gmail.com
Email: k_hamilton@gmail.com

Customer_ID: 2204201532220103
Name: Marc_Knight
Phone_Number:_8023631298
Address: -
City: -
State Code: -
PIN: -
Email: -

Customer ID: 305201423120305
Name: Albie_Rowland
Phone Number: 8025595163
Address: -
City: Hamburg
State_Code:_NY140752-
PIN: 140752-
Email:_-

Customer_ID:_607201232220901
Name: Grant_Phelps
Phone Number: 4055218053
Address: -
City:_-
State Code: -
PIN: -
Email: -

As_you can_see, the contents are getting merged in quite_a_few places. I_don't understand why.

A:

Since from the comments you know that_your declaration of your character arrays_suffer from one-too-few_character,_at_least in the case_of char state_code[2]; leaving your array_without a nul-terminating character leading to_Undefined Behavior, you should ensure you have_valid storage for all your input._(don't skimp on buffer size)
In_general, you_are making things a bit_harder on yourself_than it_needs to be._Rather than attempting to