plz tell me the use of \0 in arrays as a condition
what is the use of \0 in array
Collapse
X
-
Tags: None
-
The character constant '\0' is the NULL character and has the value 0. Its only significance is in C strings which use zero terminated arrays of characters to represent the string. The 0, NULL or '\0' character thus terminates a string of characters by convention in C, that is everybody writes their code to operate like this and the standard library is written to operate like this, it is not an inherent feature of the language. -
Since there are no String data type in C, it is used to differentiate between array of characters and string. Any array of character terminated by Null is considered as string.Comment
Comment