current position:Home>Why is there garbled code? f2. Txt also has the word hot

Why is there garbled code? f2. Txt also has the word hot

2022-02-03 02:39:49 CSDN Q & A

img




Refer to the answer 1:

Missing string Terminator '\0'

char a[11];for (int i = 0; i < 10; i++)    std::cin >> a[i];a[10] = '\0';...char c[11];



Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202030239480588.html

Random recommended