Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (anonymous):

What is the string delimiter in C - newline or null? A link with the answer would be really helpful!

OpenStudy (anonymous):

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";

OpenStudy (anonymous):

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!

OpenStudy (anonymous):

If I'm not mistaken, it is the character '\0'.

OpenStudy (anonymous):

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";

OpenStudy (anonymous):

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

OpenStudy (anonymous):

Oh, it is '\0'!! :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
4 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
7 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
7 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!