Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the end of a string flag

Shulou Source: shulou.com Published: 2022-06-03 03:11:39 09月15日 Update

Today, I would like to talk to you about what is the end of a string flag, many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

The string ending flag is "\ 0", and 0 is the ASCII code of "\ 0", which is the first ASCII code, and the ASCII code of the number 0 is 48, so the writing program ends with "/ 0".

'\ 0' is the end flag of an array of strings.

And 0 is the ASCII code of'\ 0', which is the first ASCII code, and the ASCII code of the number 0 is 48, so the writing program should end with'\ 0', for example, char a [3] = {'hoggery char'\ 0'}, or directly ASCII [] = "hi", the compiler will think of it as an array of strings and end with'\ 0'.

When debugging the program, you can see that there is 0 in memory, which is the representation of ASCII code, and can also be seen as a unsigned int type.

Reference for the application of strings:

1. Join operation concat (s 1, 7, 2, 3, … Sn) is equivalent to s _ 1 / s _ 2 / s _ 3 +. + sn.

For example: concat ('11 years and 5') ='11 aaa'

2. Ask for a sub-string. Copy intercepts a substring of length l after the beginning of the first character in the string s.

Example: copy ('abdag',2,3) =' bda'

3. Delete the substring. The procedure Delete deletes a substring of length l after the beginning of the first character from the string s.

Ex.: sburetor abcdestructivedelete (smemo 2 and 3); as a result, it is a good example

After reading the above, do you have any further understanding of what is the end of a string flag? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Characters strings flags content programs numbers arrays code tables length memory more knowledge articles types results compilers industries information channels processes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information NVidia Xiaomi Shulou Technology macOS