Ask your own question, for FREE!
Computer Science 18 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!
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!