Computer Science - Object Oriented Programming Using C++ - Discussion

Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 2)
2.
The first element in a string is
the name of the string
the first character in the string
the length of the string
the name of the array holding the string
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
8 comments Page 1 of 1.

Lakshyajit said:   1 decade ago
We that the best definition of string is "The string is a array of characters terminated with a null character". So the first element of a string is the first character of the string.

Shruti said:   10 months ago
@All

Here, It means that in a string, the first element (at index 0) refers to the very first character of that string.
For example, in the string "hello", the first element is 'h'.

Ravi said:   1 decade ago
The definition of string is collection of characters ending with null character ('/0'). So obviously, first element would be character.

Bilal said:   8 years ago
According to the question, the first element of the string. Obviously the first character. But not important in case.

Bhavnish said:   6 years ago
Yes, correct, But can anyone tell me what is the name of an array of the String which contains that String?

Babita said:   1 decade ago
According to question the first element of the string. Obviously the first character.

Hareesh said:   1 decade ago
The answer is the name of the string. Like e.g:string s, s1;

Nisha singh said:   1 decade ago
Please explain me.

Post your comments here:

Your comments will be displayed after verification.