What is the string delimiter in C - newline or null? A link with the answer would be really helpful!
When you said delimiter, do you mean the character used to denote strings? If so, in C it would be double quotes. I mean, in C, a string would look like this: cout << "This is a string";
No, I mean what I say. Not how a string is defined. A string delimiter is something that marks the end of a string. I'm confused because a null is what marks the end of a string, but while taking it as an input, the newline character ends it. And I vaguely remember reading that newline was a string delimiter, but I can't be sure!
If I'm not mistaken, it is the character '\0'.
In C string is ended by null (i.e. '\0' , already mentioned by @FNeiva); but at the time of initialisation you don't have to enter it manually. C automatically do that for you. so an example could be look like this: char value[] = "aq147852";
well speaking in C++...strings end with '\0'..if you are entering a sentence and you press enter ...the enter equals the '\0' and the string will be considered over...i'm not sure if it's same in C though
Oh, it is '\0'!! :)
Join our real-time social learning platform and learn together with your friends!