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

2. 

The first element in a string is

[A]. the name of the string
[B]. the first character in the string
[C]. the length of the string
[D]. the name of the array holding the string

Answer: Option B

Explanation:

No answer description available for this question.

Nisha Singh said: (Mar 17, 2012)  
Please explain me.

Hareesh said: (Apr 26, 2013)  
The answer is the name of the string. Like e.g:string s, s1;

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

Babita said: (May 23, 2014)  
According to question the first element of the string. Obviously the first character.

Lakshyajit said: (Jun 15, 2015)  
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.

Bilal said: (Feb 9, 2018)  
According to the question, the first element of the string. Obviously the first character. But not important in case.

Bhavnish said: (Mar 31, 2019)  
Yes, correct, But can anyone tell me what is the name of an array of the String which contains that String?

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.