Home > Back-end >  Small white inquired of c
Small white inquired of c

Time:06-04

Combine two string array is not string \ 0 at the end, please put the b in the past when a \ \ 0 0 without b did not set the array after running the past not \ 0 or a string array

CodePudding user response:

This is the character in the difference between array and
String in the definition as well as keyboard input, and string function operation will silently in tail added 0
Character array does not do that, it was more of an emphasis a one character at a time, 0 also is a kind of character, the array can put among several characters of one or more 0

Your code behind put b content in a later, is to add a 0 in the tail, because here is a character array

Do you have the possibility of crossing the line, the code be handled with care

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related